1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Bug#12727287: Maintainer mode compilation fails with gcc 4.6

GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled
by -Wall, that causes GCC to emit a warning whenever a local variable
is assigned to, but otherwise unused (aside from its declaration).

Since the maintainer mode uses -Wall and -Werror, source code which
triggers these warnings will be rejected. That is, these warnings
become hard errors.

The solution is to fix the code which triggers these specific warnings.
In most of the cases, this is a welcome cleanup as code which triggers
this warning is probably dead anyway.
This commit is contained in:
Davi Arnaut
2011-07-07 08:22:43 -03:00
parent 9fc5102673
commit 017281da24
11 changed files with 35 additions and 48 deletions

View File

@ -18596,11 +18596,8 @@ static void test_bug38486(void)
static void test_bug33831(void)
{
MYSQL *l_mysql;
my_bool error;
DBUG_ENTER("test_bug33831");
error= 0;
if (!(l_mysql= mysql_client_init(NULL)))
{
@ -18623,9 +18620,8 @@ static void test_bug33831(void)
DIE_UNLESS(0);
}
mysql_close(l_mysql);
DBUG_VOID_RETURN;
}