diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2011-07-07 08:22:43 -0300 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2011-07-07 08:22:43 -0300 |
commit | 017281da2443fa8a4ff7db455f0a79fde37d4d68 (patch) | |
tree | 6d193c324bd54e5fd5f41e5d052f067d2f8c1fc8 /unittest | |
parent | 9fc51026734880056a2da6cbe0ee584fc0e707da (diff) | |
download | mariadb-git-017281da2443fa8a4ff7db455f0a79fde37d4d68.tar.gz |
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.
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/mysys/lf-t.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/unittest/mysys/lf-t.c b/unittest/mysys/lf-t.c index 16821c862b0..573a56cc1d6 100644 --- a/unittest/mysys/lf-t.c +++ b/unittest/mysys/lf-t.c @@ -34,8 +34,7 @@ int with_my_thread_init=0; */ pthread_handler_t test_lf_pinbox(void *arg) { - int m= *(int *)arg; - int32 x= 0; + int m= *(int *)arg; LF_PINS *pins; if (with_my_thread_init) @@ -43,7 +42,7 @@ pthread_handler_t test_lf_pinbox(void *arg) pins= lf_pinbox_get_pins(&lf_allocator.pinbox); - for (x= ((int)(intptr)(&m)); m ; m--) + for (; m ; m--) { lf_pinbox_put_pins(pins); pins= lf_pinbox_get_pins(&lf_allocator.pinbox); |