com php-src: Fix some compiler warnings: phpdbg.h phpdbg_cmd .c phpdbg_set.c phpdbg_watch.c

From: Date: Sat, 11 Oct 2014 22:30:09 +0000
Subject: com php-src: Fix some compiler warnings: phpdbg.h phpdbg_cmd .c phpdbg_set.c phpdbg_watch.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82563@lists.php.net to get a copy of this message
Commit: 1486a9ebf7c42120fb5dd3e12a8de44fe1527ed7 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 12 Oct 2014 00:30:09 +0200 Parents: e19c7899799d8b5b1eacf6335f994fcbac10e2b3 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1486a9ebf7c42120fb5dd3e12a8de44fe1527ed7 Log: Fix some compiler warnings Changed paths: M phpdbg.h M phpdbg_cmd.c M phpdbg_set.c M phpdbg_watch.c Diff: diff --git a/phpdbg.h b/phpdbg.h index e567e22..a3835f3 100644 --- a/phpdbg.h +++ b/phpdbg.h @@ -90,6 +90,13 @@ #define PHPDBG_DEFAULT_PROMPT "prompt>" /* }}} */ +/* Hey, apple. One shouldn't define *functions* from the standard C library as marcos. */ +#ifdef memcpy +#define memcpy_tmp(...) memcpy(__VA_ARGS__) +#undef memcpy +#define memcpy(...) memcpy_tmp(__VA_ARGS__) +#endif + #if !defined(PHPDBG_WEBDATA_TRANSFER_H) && !defined(PHPDBG_WEBHELPER_H) #ifdef ZTS diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c index 3eb4f72..f649bde 100644 --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@ -836,7 +836,7 @@ readline: while ((bytes = read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD - len)) > 0 || (errno == EINTR && bytes < 0)) { int i; - if (bytes <= 0) { + if (bytes <= 0) { continue; } diff --git a/phpdbg_set.c b/phpdbg_set.c index 7e16499..fc7e788 100644 --- a/phpdbg_set.c +++ b/phpdbg_set.c @@ -215,7 +215,7 @@ PHPDBG_SET(stepping) /* {{{ */ phpdbg_writeln("setstepping", "type=\"%s\"", "Stepping %s", PHPDBG_G(flags) & PHPDBG_STEP_OPCODE ? "opcode" : "line"); } else switch (param->type) { case STR_PARAM: { - if ((param->len == sizeof("opcode") - 1) && memcmp(param->str, "opcode", sizeof("opcode") == SUCCESS)) { + if ((param->len == sizeof("opcode") - 1) && memcmp(param->str, "opcode", sizeof("opcode")) == SUCCESS) { PHPDBG_G(flags) |= PHPDBG_STEP_OPCODE; } else if ((param->len == sizeof("line")-1) && memcmp(param->str, "line", sizeof("line")) == SUCCESS) { PHPDBG_G(flags) &= ~PHPDBG_STEP_OPCODE; diff --git a/phpdbg_watch..c b/phpdbg_watch.c index af1bcc9..de6cddf 100644 --- a/phpdbg_watch.c +++ b/phpdbg_watch.c @@ -303,7 +303,7 @@ static int phpdbg_watchpoint_parse_wrapper(char *name, size_t len, char *keyname } PHPDBG_API int phpdbg_watchpoint_parse_input(char *input, size_t len, HashTable *parent, size_t i, int (*callback)(phpdbg_watchpoint_t * TSRMLS_DC), zend_bool silent TSRMLS_DC) { - phpdbg_parse_variable_with_arg(input, len, parent, i, (phpdbg_parse_var_with_arg_func) phpdbg_watchpoint_parse_wrapper, 0, callback TSRMLS_CC); + return phpdbg_parse_variable_with_arg(input, len, parent, i, (phpdbg_parse_var_with_arg_func) phpdbg_watchpoint_parse_wrapper, 0, callback TSRMLS_CC); } static int phpdbg_watchpoint_parse_symtables(char *input, size_t len, int (*callback)(phpdbg_watchpoint_t * TSRMLS_DC) TSRMLS_DC) {

« previous php.cvs (#82563) next »