diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-20 16:21:40 -0200 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-10-20 16:21:40 -0200 |
commit | 3e9c52250a3ab6664c53ea6b3923acfbe8e09e4e (patch) | |
tree | d427278052923d3b649a03292a823b7468075b95 /storage/myisam | |
parent | b5bb13ec0380624c2e663a4e9b4b29fe574b3e05 (diff) | |
download | mariadb-git-3e9c52250a3ab6664c53ea6b3923acfbe8e09e4e.tar.gz |
Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted warnings that are generated in optimized builds.
Most of it is silencing variables that are set but unused.
This patch also introduces the MY_ASSERT_UNREACHABLE macro
which helps the compiler to deduce that a certain piece of
code is unreachable.
include/my_compiler.h:
Use GCC's __builtin_unreachable if available. It allows
GCC to deduce the unreachability of certain code paths,
thus avoiding warnings that, for example, accused that a
variable could be used without being initialized (due to
unreachable code paths).
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/myisamchk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 96ceb35b3d5..7f9776ca8d0 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -697,8 +697,7 @@ get_one_option(int optid, case OPT_STATS_METHOD: { int method; - enum_mi_stats_method method_conv; - LINT_INIT(method_conv); + enum_mi_stats_method UNINIT_VAR(method_conv); myisam_stats_method_str= argument; if ((method=find_type(argument, &myisam_stats_method_typelib, 2)) <= 0) { |