mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-24 06:50:08 +03:00
build: Remove some GCC warnings
-Wnested-externs produces spurious warnings after implicit declaration of functions. -Winline is useless since we don't use inlines. -Wredundant-decls was already removed for autotools.
This commit is contained in:
parent
da274bfa55
commit
e7f0d88ba4
@ -418,8 +418,8 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
# These compiler flags can break the checks above so keep them here.
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wshadow \
|
||||
-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return \
|
||||
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \
|
||||
-Wredundant-decls -Wno-long-long -Wno-format-extra-args")
|
||||
-Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wno-long-long -Wno-format-extra-args")
|
||||
|
||||
if(BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
|
||||
check_linker_flag(C "LINKER:--undefined-version" FLAG_UNDEFINED_VERSION)
|
||||
|
@ -518,7 +518,7 @@ else
|
||||
fi
|
||||
|
||||
# warnings we'd like to see
|
||||
AM_CFLAGS="${AM_CFLAGS} -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline"
|
||||
AM_CFLAGS="${AM_CFLAGS} -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes"
|
||||
# warnings we'd like to suppress
|
||||
AM_CFLAGS="${AM_CFLAGS} -Wno-long-long -Wno-format-extra-args"
|
||||
case "${host}" in
|
||||
|
Loading…
x
Reference in New Issue
Block a user