mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
CMakeLists: Disable -Werror for 3rdparty/sqlite3.c
We package vanilla sqlite from upstream and on Fedora 40 with sqlite 3.46 there's the following compiler warning: In function 'sqlite3Strlen30', inlined from 'sqlite3ColumnSetColl' at ../../src/3rdparty/sqlite3.c:122105:10: ../../src/3rdparty/sqlite3.c:35003:28: error: 'strlen' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread] 35003 | return 0x3fffffff & (int)strlen(z); | ^~~~~~~~~ In function 'sqlite3ColumnSetColl': Disabling -Werror on sqlite3.c seems sensible given we have little control over that code.
This commit is contained in:
parent
5af23757fa
commit
003d2d1468
1 changed files with 6 additions and 0 deletions
|
@ -45,11 +45,13 @@ if (MSVC)
|
|||
# TODO: This is disabled for now because there a bunch of known
|
||||
# compiler warnings on Windows that we don't have good fixes for.
|
||||
#set(WERROR_FLAG "/WX")
|
||||
#set(WNOERROR_FLAG "/WX:NO")
|
||||
endif ()
|
||||
else ()
|
||||
set(SIGN_COMPARE_FLAG "-Wno-sign-compare")
|
||||
if (BUILD_WITH_WERROR)
|
||||
set(WERROR_FLAG "-Werror")
|
||||
set(WNOERROR_FLAG "-Wno-error")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
@ -445,6 +447,10 @@ set(THIRD_PARTY_SRCS
|
|||
$<$<BOOL:USE_SQLITE>:3rdparty/sqlite3.c>
|
||||
3rdparty/strsep.c)
|
||||
|
||||
if (USE_SQLITE AND WNOERROR_FLAG)
|
||||
set_source_files_properties(3rdparty/sqlite3.c PROPERTIES COMPILE_FLAGS ${WNOERROR_FLAG})
|
||||
endif ()
|
||||
|
||||
# Highwayhash. Highwayhash is a bit special since it has architecture dependent
|
||||
# code...
|
||||
set(hhash_dir ${PROJECT_SOURCE_DIR}/auxil/highwayhash/highwayhash)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue