Browse Source

[build] remove -Wdeclaration-after-statement

Declarations after statements has been permitted since C99.
(That was 20 years ago!)
personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent
commit
2f46736edc
  1. 2
      configure.ac
  2. 2
      meson_options.txt
  3. 2
      src/CMakeLists.txt

2
configure.ac

@ -1353,7 +1353,7 @@ AC_ARG_ENABLE([extra-warnings],
)
if test "$extrawarnings" = true || test "$extrawarnings" = error; then
TRY_CFLAGS([-g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security])
TRY_CFLAGS([-g -O2 -g2 -Wall -Wmissing-declarations -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security])
TRY_LDFLAGS([-Wl,--as-needed])
if test "$extrawarnings" = error; then
AS_VAR_APPEND([CFLAGS], [" -Werror"])

2
meson_options.txt

@ -121,7 +121,7 @@ option('build_extra_warnings',
)
option('warn_cflags',
type: 'string',
value: '-g -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security',
value: '-g -g2 -Wall -Wmissing-declarations -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security',
description: 'CFLAGS to use when build_extra_warnings is active',
)

2
src/CMakeLists.txt

@ -41,7 +41,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
option(BUILD_EXTRA_WARNINGS "extra warnings")
if(BUILD_EXTRA_WARNINGS)
set(WARN_CFLAGS "-g -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security")
set(WARN_CFLAGS "-g -g2 -Wall -Wmissing-declarations -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security")
set(WARN_LDFLAGS "-Wl,--as-needed")
# -Werror -Wbad-function-cast -Wmissing-prototypes
endif()

Loading…
Cancel
Save