From b7e4ee6faab9bc594f0d3fff625a676253d0f09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 1 Jun 2021 11:32:02 +0300 Subject: [PATCH] Fix qc_sqlite compilation failure with GCC 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sqlite code is indented oddly: In file included from query_classifier/qc_sqlite/qc_sqlite3.c:21: sqlite-bld-3110100/sqlite3.c:98051:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 98051 | if( a[0]<33 ) a[0] = 33; assert( 33==sqlite3LogEst(10) ); | ^~ sqlite-bld-3110100/sqlite3.c:98051:35: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 98051 | if( a[0]<33 ) a[0] = 33; assert( 33==sqlite3LogEst(10) ); | ^~~~~~ --- query_classifier/qc_sqlite/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/query_classifier/qc_sqlite/CMakeLists.txt b/query_classifier/qc_sqlite/CMakeLists.txt index 7e2fd13ca..23f3570ca 100644 --- a/query_classifier/qc_sqlite/CMakeLists.txt +++ b/query_classifier/qc_sqlite/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories(${CMAKE_BINARY_DIR}/sqlite-bld-3110100) include_directories(${MARIADB_CONNECTOR_INCLUDE_DIR}) # GCC thinks there is an array-bounds error in sqlite code. -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=array-bounds") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=array-bounds -Wno-misleading-indentation") add_library(qc_sqlite SHARED qc_sqlite.cc qc_sqlite3.c builtin_functions.c) add_dependencies(qc_sqlite maxscale_sqlite)