mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
This commit is contained in:
@ -3639,7 +3639,7 @@ xmlencode_print(const char *src, uint length)
|
||||
tee_fputs("NULL", PAGER);
|
||||
else
|
||||
{
|
||||
for (const char *p = src; length; *p++, length--)
|
||||
for (const char *p = src; length; p++, length--)
|
||||
{
|
||||
const char *t;
|
||||
if ((t = array_value(xmlmeta, *p)))
|
||||
@ -4726,7 +4726,7 @@ static const char* construct_prompt()
|
||||
struct tm *t = localtime(&lclock);
|
||||
|
||||
/* parse thru the settings for the prompt */
|
||||
for (char *c = current_prompt; *c ; *c++)
|
||||
for (char *c = current_prompt; *c ; c++)
|
||||
{
|
||||
if (*c != PROMPT_CHAR)
|
||||
processed_prompt.append(*c);
|
||||
|
Reference in New Issue
Block a user