1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +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:
Davi Arnaut
2010-07-20 15:07:36 -03:00
parent d676c3ff0e
commit c96b249fc3
34 changed files with 155 additions and 174 deletions

View File

@@ -3783,7 +3783,6 @@ static void end_ssl()
static int init_server_components()
{
FILE* reopen;
DBUG_ENTER("init_server_components");
/*
We need to call each of these following functions to ensure that
@@ -3826,8 +3825,8 @@ static int init_server_components()
if (freopen(log_error_file, "a+", stdout))
#endif
{
reopen= freopen(log_error_file, "a+", stderr);
setbuf(stderr, NULL);
if (freopen(log_error_file, "a+", stderr))
setbuf(stderr, NULL);
}
}
}
@@ -8222,7 +8221,7 @@ mysqld_get_one_option(int optid,
*val= 0;
val+= 2;
while (*val && my_isspace(mysqld_charset, *val))
*val++;
val++;
if (!*val)
{
sql_print_error("Bad syntax in replicate-rewrite-db - empty TO db!\n");