mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 01:36:23 -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})
|
set(GCC_V ${CMAKE_C_COMPILER_VERSION})
|
||||||
|
|
||||||
list(APPEND __FLAGS
|
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+
|
-fno-strict-aliasing # gcc 2.9.5+
|
||||||
|
|
||||||
@ -270,14 +270,19 @@ if (${GNUC})
|
|||||||
|
|
||||||
# gcc 4.2
|
# gcc 4.2
|
||||||
-Waddress
|
-Waddress
|
||||||
-Wno-unused-function
|
|
||||||
-Wnormalized=id
|
-Wnormalized=id
|
||||||
-Woverride-init
|
-Woverride-init
|
||||||
|
|
||||||
# gcc 4.5
|
# gcc 4.5
|
||||||
-Wlogical-op
|
-Wlogical-op
|
||||||
|
|
||||||
|
-Wwrite-strings
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (${CLANG})
|
||||||
|
list(APPEND __FLAGS -Wno-unused-function)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (EVENT__DISABLE_GCC_WARNINGS)
|
if (EVENT__DISABLE_GCC_WARNINGS)
|
||||||
list(APPEND __FLAGS -w)
|
list(APPEND __FLAGS -w)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user