com php-src: squish warnings: dev/phpdbg_parser.y phpdbg _list.c phpdbg_parser.c phpdbg_set.c
| From: | Bob Weinand | Date: | Sun, 13 Apr 2014 08:07:15 +0000 |
| Subject: | com php-src: squish warnings: dev/phpdbg_parser.y phpdbg _list.c phpdbg_parser.c phpdbg_set.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77002@lists.php.net to get a copy of this message | ||
Commit: b8a4a4c700af6373c87b955e64808f1b927f7ccc
Author: krakjoe <joe.watkins@live.co.uk> Sun, 13 Apr 2014 09:07:15 +0100
Parents: 0dc9be6f1e807f4556283d2c90fa3bab50c45334
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b8a4a4c700af6373c87b955e64808f1b927f7ccc
Log:
squish warnings
Changed paths:
M dev/phpdbg_parser.y
M phpdbg_list.c
M phpdbg_parser.c
M phpdbg_set.c
Diff:
diff --git a/dev/phpdbg_parser.y b/dev/phpdbg_parser.y
index 9d31a5d..58306e0 100644
--- a/dev/phpdbg_parser.y
+++ b/dev/phpdbg_parser.y
@@ -26,7 +26,6 @@ int yyerror(phpdbg_param_t *stack, yyscan_t scanner, const char *msg) {
phpdbg_error("Parse Error: %s", msg);
{
const phpdbg_param_t *top = stack;
- zend_ulong position = 0L;
while (top) {
phpdbg_param_debug(
@@ -34,6 +33,7 @@ int yyerror(phpdbg_param_t *stack, yyscan_t scanner, const char *msg) {
top = top->next;
}
}
+ return 0;
}
%}
diff --git a/phpdbg_list.c b/phpdbg_list.c
index 96c4728..037c6c3 100644
--- a/phpdbg_list.c
+++ b/phpdbg_list.c
@@ -54,7 +54,6 @@ PHPDBG_LIST(lines) /* {{{ */
switch (param->type) {
case NUMERIC_PARAM:
- printf("list lines: %d\n", param->num);
phpdbg_list_file(phpdbg_current_file(TSRMLS_C),
(param->num < 0 ? 1 - param->num : param->num),
(param->num < 0 ? param->num : 0) + zend_get_executed_lineno(TSRMLS_C),
@@ -128,10 +127,8 @@ PHPDBG_LIST(class) /* {{{ */
void phpdbg_list_file(const char *filename, long count, long offset, int highlight TSRMLS_DC) /*
{{{ */
{
struct stat st;
- char *opened = NULL,
- *mem = NULL;
+ char *opened = NULL;
char buffer[8096] = {0,};
- size_t buflen = 0L;
long line = 0;
php_stream *stream = NULL;
@@ -148,18 +145,18 @@ void phpdbg_list_file(const char *filename, long count, long offset, int
highlig
return;
}
- while ((buflen = php_stream_gets(stream, buffer, sizeof(buffer))) > 0L) {
+ while (php_stream_gets(stream, buffer, sizeof(buffer)) != NULL) {
++line;
if (!offset || offset <= line) {
/* Without offset, or offset reached */
if (!highlight) {
- phpdbg_write("%05u: %s", line, buffer);
+ phpdbg_write("%05ld: %s", line, buffer);
} else {
if (highlight != line) {
- phpdbg_write(" %05u: %s", line, buffer);
+ phpdbg_write(" %05ld: %s", line, buffer);
} else {
- phpdbg_write(">%05u: %s", line, buffer);
+ phpdbg_write(">%05ld: %s", line, buffer);
}
}
}
diff --git a/phpdbg_parser.c b/phpdbg_parser.c
index 6ea96d8..eabe78e 100644
--- a/phpdbg_parser.c
+++ b/phpdbg_parser.c
@@ -91,7 +91,6 @@ int yyerror(phpdbg_param_t *stack, yyscan_t scanner, const char *msg) {
phpdbg_error("Parse Error: %s", msg);
{
const phpdbg_param_t *top = stack;
- zend_ulong position = 0L;
while (top) {
phpdbg_param_debug(
@@ -99,6 +98,7 @@ int yyerror(phpdbg_param_t *stack, yyscan_t scanner, const char *msg) {
top = top->next;
}
}
+ return 0;
}
/* Line 371 of yacc.c */
diff --git a/phpdbg_set.c b/phpdbg_set.c
index fa462e2..e8027a8 100644
--- a/phpdbg_set.c
+++ b/phpdbg_set.c
@@ -203,6 +203,8 @@ PHPDBG_SET(quiet) /* {{{ */
PHPDBG_G(flags) |= PHPDBG_IS_QUIET;
} else PHPDBG_G(flags) &= ~PHPDBG_IS_QUIET;
} break;
+
+ phpdbg_default_switch_case();
}
return SUCCESS;