mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-23 02:50:08 +03:00
Eliminate false positive -Warray-bounds on some compilers
This affects GCC 7.3, MinGW 7.3, and LCC 1.25 and 1.26. In some sense it reverts ad93f087.
This commit is contained in:
parent
a3043b478f
commit
5c60860905
@ -383,7 +383,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wshadow \
|
||||
-Wpointer-arith -Wcast-align -Wwrite-strings \
|
||||
-Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wno-long-long -Wno-format-extra-args")
|
||||
-Wno-long-long -Wno-format-extra-args -Wno-array-bounds")
|
||||
|
||||
if(LIBXML2_WITH_LEGACY AND BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
|
||||
check_linker_flag(C "LINKER:--undefined-version" FLAG_UNDEFINED_VERSION)
|
||||
|
@ -397,7 +397,7 @@ else
|
||||
# warnings we'd like to see
|
||||
AM_CFLAGS="${AM_CFLAGS} -pedantic -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes"
|
||||
# warnings we'd like to suppress
|
||||
AM_CFLAGS="${AM_CFLAGS} -Wno-long-long -Wno-format-extra-args"
|
||||
AM_CFLAGS="${AM_CFLAGS} -Wno-long-long -Wno-format-extra-args -Wno-array-bounds"
|
||||
case "${host}" in
|
||||
alpha*-*-linux* )
|
||||
AM_CFLAGS="${AM_CFLAGS} -mieee"
|
||||
|
@ -191,6 +191,7 @@ if cc.get_argument_syntax() == 'gcc'
|
||||
'-Wmissing-prototypes',
|
||||
'-Wno-long-long',
|
||||
'-Wno-format-extra-args',
|
||||
'-Wno-array-bounds',
|
||||
]
|
||||
|
||||
if host_machine.cpu_family() == 'alpha'
|
||||
|
Loading…
x
Reference in New Issue
Block a user