Bug #88635 Compile warning on 5.5.58 optimized build
Submitted: 24 Nov 2017 4:26 Modified: 19 Nov 2018 14:40
Reporter: Roel Van de Paar Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.5.58 OS:Any
Assigned to: CPU Architecture:Any

[24 Nov 2017 4:26] Roel Van de Paar
Description:
[ 86%] Building CXX object sql/CMakeFiles/sql.dir/debug_sync.cc.o
[ 86%] Building CXX object sql/CMakeFiles/sql.dir/sql_repl.cc.o
/git/mysql-server_opt/sql/sql_repl.cc: In function ‘bool log_in_use(const char*)’:
/git/mysql-server_opt/sql/sql_repl.cc:253:78: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
     DEBUG_SYNC(current_thd,"purge_logs_after_lock_index_before_thread_count");
                                                                              ^
[ 86%] Building CXX object sql/CMakeFiles/sql.dir/sql_select.cc.o
[ 86%] Building CXX object sql/CMakeFiles/sql.dir/sql_show.cc.o

How to repeat:
Centos 7 x64, 7.4.1708 (not sure if it matters)

cmake . -DWITH_ZLIB=system -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DENABLE_DOWNLOADS=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp -DWITH_SSL=system -DWITH_PAM=ON
[24 Nov 2017 7:02] MySQL Verification Team
Hello Roel,

Thank you for the report.

Thanks,
Umesh
[19 Nov 2018 14:40] Dyre Tjeldvoll
Posted by developer:
 
Thanks for bringing this to our attention. We aim to be warning free also in optimized mode, but such fixes normally only go into the development branch and are not backported to GA releases. As this issue is fixed in newer versions, we need to close this bug.