Bug #84617 conditional-uninitialized warnings on recent clang
Submitted: 23 Jan 2017 14:47 Modified: 24 Jan 2017 14:18
Reporter: Knut Anders Hatlen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.0 OS:Any
Assigned to: CPU Architecture:Any

[23 Jan 2017 14:47] Knut Anders Hatlen
Description:
Clang 3.9 emits some conditional-uninitialized warnings.

[1794/2241] Building CXX object sql/CMakeFiles/sql_main.dir/item_strfunc.cc.o
/code/mysql/trunk/sql/item_strfunc.cc:2273:3: warning: variable 'conv' may be uninitialized when used here [-Wconditional-uninitialized]
  conv->str_value.copy();
  ^~~~
/code/mysql/trunk/sql/item_strfunc.cc:2255:20: note: initialize the variable 'conv' to silence this warning
  Item_string *conv;
                   ^
                    = nullptr
1 warning generated.
[2033/2241] Building CXX object sql/CMakeFiles/sql_main.dir/sql_partition.cc.o
/code/mysql/trunk/sql/sql_partition.cc:977:39: warning: variable 'table_list' may be uninitialized when used here [-Wconditional-uninitialized]
  context->resolve_in_table_list_only(table_list);
                                      ^~~~~~~~~~
/code/mysql/trunk/sql/sql_partition.cc:956:25: note: initialize the variable 'table_list' to silence this warning
  TABLE_LIST *table_list;
                        ^
                         = nullptr
1 warning generated.

How to repeat:
Build with clang 3.9 and -DMYSQL_MAINTAINER_MODE=1.
[24 Jan 2017 14:18] Paul DuBois
Posted by developer:
 
Fixed in 8.0.1.

Code cleanup. No changelog entry needed.