mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 11:15:33 +02:00
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).
This commit is contained in:
parent
b5bb13ec03
commit
3e9c52250a
18 changed files with 53 additions and 45 deletions
|
|
@ -686,7 +686,7 @@ bool mysqld_help(THD *thd, const char *mask)
|
|||
|
||||
if (count_topics == 0)
|
||||
{
|
||||
int key_id;
|
||||
int UNINIT_VAR(key_id);
|
||||
if (!(select=
|
||||
prepare_select_for_name(thd,mask,mlen,tables,tables[3].table,
|
||||
used_fields[help_keyword_name].field,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue