1
0
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:
Nick Wellnhofer 2023-09-21 01:38:26 +02:00
parent da274bfa55
commit e7f0d88ba4
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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