mirror of
https://github.com/php/php-src.git
synced 2025-01-12 14:04:45 +08:00
squish warnings
This commit is contained in:
parent
0dc9be6f1e
commit
b8a4a4c700
@ -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;
|
||||
}
|
||||
%}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user