mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-03 17:26:24 -04:00
cmake: sync warnings with autotools v2
By some reason gcc reports next error: ../http.c:3330:11: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] value = ""; Only under -Wwrite-strings, well this is logical, but this information does not reflected in any documentation. Follow-up: 8348b413 ("cmake: add various warning flags like autotools has") f (cherry picked from commit 42d5a36bd8076c137545759d34500401627a649b)
This commit is contained in:
parent
3f893f0a6e
commit
b062bf0af7
@ -259,7 +259,7 @@ if (${GNUC})
|
||||
set(GCC_V ${CMAKE_C_COMPILER_VERSION})
|
||||
|
||||
list(APPEND __FLAGS
|
||||
-Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing
|
||||
-Wall -Wextra -Wno-unused-parameter -Wstrict-aliasing -Wstrict-prototypes
|
||||
|
||||
-fno-strict-aliasing # gcc 2.9.5+
|
||||
|
||||
@ -270,14 +270,19 @@ if (${GNUC})
|
||||
|
||||
# gcc 4.2
|
||||
-Waddress
|
||||
-Wno-unused-function
|
||||
-Wnormalized=id
|
||||
-Woverride-init
|
||||
|
||||
# gcc 4.5
|
||||
-Wlogical-op
|
||||
|
||||
-Wwrite-strings
|
||||
)
|
||||
|
||||
if (${CLANG})
|
||||
list(APPEND __FLAGS -Wno-unused-function)
|
||||
endif()
|
||||
|
||||
if (EVENT__DISABLE_GCC_WARNINGS)
|
||||
list(APPEND __FLAGS -w)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user