summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2011-07-07 08:22:43 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2011-07-07 08:22:43 -0300
commit017281da2443fa8a4ff7db455f0a79fde37d4d68 (patch)
tree6d193c324bd54e5fd5f41e5d052f067d2f8c1fc8 /storage/perfschema
parent9fc51026734880056a2da6cbe0ee584fc0e707da (diff)
downloadmariadb-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 'storage/perfschema')
-rw-r--r--storage/perfschema/pfs.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc
index 139064ab212..27350c59604 100644
--- a/storage/perfschema/pfs.cc
+++ b/storage/perfschema/pfs.cc
@@ -1574,6 +1574,9 @@ static void unlock_rwlock_v1(PSI_rwlock *rwlock)
aggregate_single_stat_chain(&pfs_rwlock->m_read_lock_stat, locked_time);
}
}
+#else
+ (void) last_reader;
+ (void) last_writer;
#endif
}