Bug #81217 Fix compile warnings reported by GCC 6.1
Submitted: 28 Apr 2016 8:53 Modified: 4 May 2016 14:17
Reporter: Jon Olav Hauglid 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

[28 Apr 2016 8:53] Jon Olav Hauglid
Description:
GCC 6.1 has just been released. Compiling trunk with it gives new sets of warning such as:

sql/item_timefunc.cc: In member function ‘void Item_func_str_to_date::fix_from_format(const char*, size_t)’:
./repo/mysql-joh/sql/item_timefunc.cc:3298:21: error: logical ‘and’ of equal expressions [-Werror=logical-op]
   for (; val != end && val != end; val++)
          ~~~~~~~~~~~^~~~~~~~~~~~~

libbinlogevents/src/uuid.cpp:72:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
     if (*in_string != '{' || in_string[TEXT_LENGTH + 1] != '}')
     ^~

storage/innobase/include/ut0dbg.h:46:20: error: nonnull argument ‘col’ compared to NULL [-Werror=nonnull-compare]
  if (UNIV_UNLIKELY(!(ulint) (EXPR))) {   \
                    ^~~~~~~~~~~~~~~

How to repeat:
Build trunk with GCC 6.1
[4 May 2016 14:17] Paul DuBois
Posted by developer:
 
Fixed in 5.8.0.

Code cleanup. No changelog entry required.
[18 Jun 2016 21:37] Omer Barnir
Posted by developer:
 
Reported version value updated to reflect release name change from 5.8 to 8.0