mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
removed warning; WS
This commit is contained in:
parent
7b44890ac4
commit
f89f66d762
3 changed files with 19 additions and 23 deletions
|
@ -131,7 +131,7 @@ void pretty_print(char *text TSRMLS_DC)
|
||||||
phpdbg_error("Output overrun of %lu bytes", ((q-new) - size));
|
phpdbg_error("Output overrun of %lu bytes", ((q-new) - size));
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) phpdbg_write("%s\n", new);
|
phpdbg_write("%s\n", new);
|
||||||
efree(new);
|
efree(new);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -139,8 +139,7 @@ void pretty_print(char *text TSRMLS_DC)
|
||||||
void summary_print(phpdbg_command_t const * const cmd TSRMLS_DC)
|
void summary_print(phpdbg_command_t const * const cmd TSRMLS_DC)
|
||||||
{
|
{
|
||||||
char *summary;
|
char *summary;
|
||||||
spprintf(&summary, 0, "Command: **%s** Alias: **%c** **%s**\n",
|
spprintf(&summary, 0, "Command: **%s** Alias: **%c** **%s**\n", cmd->name, cmd->alias, cmd->tip);
|
||||||
cmd->name, cmd->alias, cmd->tip);
|
|
||||||
pretty_print(summary TSRMLS_CC);
|
pretty_print(summary TSRMLS_CC);
|
||||||
efree(summary);
|
efree(summary);
|
||||||
}
|
}
|
||||||
|
@ -174,7 +173,7 @@ static char *get_help(const char * const key TSRMLS_DC)
|
||||||
static int get_command(
|
static int get_command(
|
||||||
const char *key, size_t len, /* pointer and length of key */
|
const char *key, size_t len, /* pointer and length of key */
|
||||||
phpdbg_command_t const **command, /* address of first matching command */
|
phpdbg_command_t const **command, /* address of first matching command */
|
||||||
phpdbg_command_t const * const commands /* command table to be scanned */
|
phpdbg_command_t const * commands /* command table to be scanned */
|
||||||
TSRMLS_DC)
|
TSRMLS_DC)
|
||||||
{
|
{
|
||||||
const phpdbg_command_t *c;
|
const phpdbg_command_t *c;
|
||||||
|
@ -270,7 +269,7 @@ PHPDBG_HELP(aliases) /* {{{ */
|
||||||
for(c_sub = c->subs; c_sub->alias; c_sub++) {
|
for(c_sub = c->subs; c_sub->alias; c_sub++) {
|
||||||
if (c_sub->alias) {
|
if (c_sub->alias) {
|
||||||
phpdbg_writeln(" %c %c %s %-*s %s",
|
phpdbg_writeln(" %c %c %s %-*s %s",
|
||||||
c->alias, c_sub->alias, c->name, len, c_sub->name, c_sub->tip);
|
c->alias, c_sub->alias, (char *)c->name, len, c_sub->name, c_sub->tip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,10 +277,7 @@ PHPDBG_HELP(aliases) /* {{{ */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print out aliases for help as this one comes last, with the added text on how aliases are used */
|
/* Print out aliases for help as this one comes last, with the added text on how aliases are used */
|
||||||
(void) get_command( "h", 1, & c, phpdbg_prompt_commands TSRMLS_CC);
|
get_command("h", 1, &c, phpdbg_prompt_commands TSRMLS_CC);
|
||||||
/* In function ‘phpdbg_do_help_aliases’:
|
|
||||||
274:2: warning: passing argument 3 of ‘get_command’ from incompatible pointer type [enabled by default]
|
|
||||||
180:12: note: expected ‘struct phpdbg_command_t **’ but argument is of type ‘const struct phpdbg_command_t **’ */
|
|
||||||
phpdbg_writeln(" %c %-20s %s\n", c->alias, c->name, c->tip);
|
phpdbg_writeln(" %c %-20s %s\n", c->alias, c->name, c->tip);
|
||||||
|
|
||||||
len = 20 - 1 - c->name_len;
|
len = 20 - 1 - c->name_len;
|
||||||
|
|
|
@ -391,7 +391,7 @@ PHPDBG_API const char *phpdbg_get_prompt(TSRMLS_D) /* {{{ */
|
||||||
PHPDBG_API int phpdbg_get_terminal_width(TSRMLS_D) /* {{{ */
|
PHPDBG_API int phpdbg_get_terminal_width(TSRMLS_D) /* {{{ */
|
||||||
{
|
{
|
||||||
int columns;
|
int columns;
|
||||||
#ifdef _win32
|
#ifdef _WIN32
|
||||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||||
|
|
||||||
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue