From a925be4e2a05af23f660291b12a486e0a9ac7802 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 8 Mar 2017 17:18:06 +0200 Subject: [PATCH] Turn off error in qc_sqlite built GCC on CentOS6 thinks there is an array-bounds error in the sqlite code. As that code is outside our hands, it is easiest to instruct GCC not to treat it as an error. --- query_classifier/qc_sqlite/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/query_classifier/qc_sqlite/CMakeLists.txt b/query_classifier/qc_sqlite/CMakeLists.txt index 159e792f2..d09745a1b 100644 --- a/query_classifier/qc_sqlite/CMakeLists.txt +++ b/query_classifier/qc_sqlite/CMakeLists.txt @@ -16,6 +16,9 @@ include_directories(${CMAKE_BINARY_DIR}/sqlite-bld-3110100/tsrc) 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") + add_library(qc_sqlite SHARED qc_sqlite.c qc_sqlite3.c builtin_functions.c) add_dependencies(qc_sqlite maxscale_sqlite) add_definitions(-DMAXSCALE -DSQLITE_THREADSAFE=0 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT -DSQLITE_OMIT_ATTACH -DSQLITE_OMIT_REINDEX -DSQLITE_OMIT_AUTOVACUUM -DSQLITE_OMIT_PRAGMA)