diff --git a/dev/phpdbg_parser.y b/dev/phpdbg_parser.y index 9d31a5d3e7a..58306e07f91 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 96c47287071..037c6c38b2a 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 6ea96d84d51..eabe78e7931 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 fa462e2f182..e8027a8930b 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;