From 79c6dad5693400e69633aec1b7b8f186ea8183d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 23 Aug 2016 22:44:58 +0200 Subject: [PATCH] Fix compile w/ G++ 6.1.1 on Fedora 24 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit storage/innobase/include/ut0dbg.h:52:20: error: nonnull argument ‘offsets’ compared to NULL [-Werror=nonnull-compare] storage/innobase/fts/fts0fts.cc:6822:17: error: C++11 requires a space between string literal and macro [-Werror=c++11-compat] sql/sql_update.cc:813:7: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] A similar issue exists in boost: boost_1_59_0/boost/numeric/ublas/matrix_expression.hpp:2224:17: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] --- cmake/maintainer.cmake | 2 +- rapid/plugin/x/mysqlxtest_src/mysqlx.cc | 10 +++++----- sql/sql_update.cc | 2 +- storage/innobase/fts/fts0fts.cc | 2 +- storage/innobase/include/fts0priv.ic | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake index 8b3a2be..2a9e1f9 100644 --- a/cmake/maintainer.cmake +++ b/cmake/maintainer.cmake @@ -22,7 +22,7 @@ SET(MY_C_WARNING_FLAGS # Common warning flags for G++ and Clang++ SET(MY_CXX_WARNING_FLAGS - "${MY_WARNING_FLAGS} -Woverloaded-virtual -Wno-unused-parameter") + "${MY_WARNING_FLAGS} -Woverloaded-virtual -Wno-unused-parameter -Wno-nonnull-compare") # Extra warning flags for Clang++ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/rapid/plugin/x/mysqlxtest_src/mysqlx.cc b/rapid/plugin/x/mysqlxtest_src/mysqlx.cc index 028dbb7..b5f520f 100644 --- a/rapid/plugin/x/mysqlxtest_src/mysqlx.cc +++ b/rapid/plugin/x/mysqlxtest_src/mysqlx.cc @@ -1526,12 +1526,12 @@ boost::shared_ptr Result::next() if (m_state == ReadStmtOk) read_stmt_ok(); - if (m_state != ReadDone) - { - ret_val = read_row(); + if (m_state != ReadDone) + { + ret_val = read_row(); - if (m_state == ReadStmtOk) - read_stmt_ok(); + if (m_state == ReadStmtOk) + read_stmt_ok(); } } diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 0ae9a48..ce54959 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -815,7 +815,7 @@ bool mysql_update(THD *thd, TRG_EVENT_UPDATE, 0)) break; /* purecov: inspected */ - found++; + found++; if (!records_are_comparable(table) || compare_records(table)) { diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index 9ad0635..87c28c7 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -6819,7 +6819,7 @@ fts_fake_hex_to_dec( #ifdef _WIN32 sscanf(tmp_id, "%016llu", &dec_id); #else - sscanf(tmp_id, "%016"PRIu64, &dec_id); + sscanf(tmp_id, "%016" PRIu64, &dec_id); #endif /* _WIN32 */ ut_ad(ret == 1); diff --git a/storage/innobase/include/fts0priv.ic b/storage/innobase/include/fts0priv.ic index 03160b5..eb92ba9 100644 --- a/storage/innobase/include/fts0priv.ic +++ b/storage/innobase/include/fts0priv.ic @@ -53,7 +53,7 @@ fts_write_object_id( /* Use this to construct old(5.6.14 and 5.7.3) windows ambiguous aux table names */ DBUG_EXECUTE_IF("innodb_test_wrong_windows_fts_aux_table_name", - return(sprintf(str, "%016"PRIu64, id));); + return(sprintf(str, "%016" PRIu64, id));); DBUG_EXECUTE_IF("innodb_test_wrong_fts_aux_table_name", return(sprintf(str, UINT64PFx, id));); @@ -66,7 +66,7 @@ fts_write_object_id( // FIXME: Use ut_snprintf(), so does following one. return(sprintf(str, "%016llu", id)); #else /* _WIN32 */ - return(sprintf(str, "%016"PRIu64, id)); + return(sprintf(str, "%016" PRIu64, id)); #endif /* _WIN32 */ }