mariadb/unittest/mysys
Davi Arnaut 71e0ff64f0 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.

dbug/dbug.c:
  Unused but set.
libmysqld/lib_sql.cc:
  Length is not necessary as the converted error message is always
  null-terminated.
sql/item_func.cc:
  Make get_var_with_binlog private to this compilation unit.
  If a error was raised, do not attempt to evaluate the user
  variable as the statement execution will be interrupted
  anyway.
sql/mysqld.cc:
  Use a void expression to silence the warning. Avoids the use of
  macros that would make the code more unreadable than it already is.
sql/protocol.cc:
  Length is not necessary as the converted error message is always
  null-terminated. Remove unnecessary casts and assignment.
sql/sql_class.h:
  Function is only used in a single compilation unit.
sql/sql_load.cc:
  Only use the variable outside of EMBEDDED_LIBRARY.
storage/innobase/btr/btr0cur.c:
  Do not retrieve field, only the record length is being used.
storage/perfschema/pfs.cc:
  Use a void expression to silence the warning.
tests/mysql_client_test.c:
  Unused but set.
unittest/mysys/lf-t.c:
  Unused but set.
2011-07-07 08:22:43 -03:00
..
base64-t.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
bitmap-t.c Updated/added copyright headers 2011-07-04 01:25:49 +02:00
CMakeLists.txt merged mysql-5.5 into WL1054-5.5 2010-08-16 18:16:07 +03:00
lf-t.c Bug#12727287: Maintainer mode compilation fails with gcc 4.6 2011-07-07 08:22:43 -03:00
my_atomic-t.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
my_malloc-t.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_rdtsc-t.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
my_vsnprintf-t.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00
thr_template.c Updated/added copyright headers 2011-06-30 17:46:53 +02:00