build: Disable gcc warnings as warnings, too

We use -Werror in the build, so even if some warnings are just warnings,
they'd be errors.
This commit is contained in:
Benjamin Otte 2021-11-15 15:34:05 +01:00
parent c003260d63
commit 300a88922e
4 changed files with 12 additions and 4 deletions

View File

@ -228,7 +228,9 @@ endif
# Use a subset of compiler flags # Use a subset of compiler flags
demo_cflags = [] demo_cflags = []
foreach flag: common_cflags foreach flag: common_cflags
if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden'] if flag not in ['-Werror=missing-prototypes', '-Wmissing-prototypes',
'-Werror=missing-declarations', '-Wmissing-declarations',
'-fvisibility=hidden']
demo_cflags += flag demo_cflags += flag
endif endif
endforeach endforeach

View File

@ -44,7 +44,9 @@ is_debug = get_option('buildtype').startswith('debug')
test_cargs = [] test_cargs = []
foreach flag: common_cflags foreach flag: common_cflags
if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden'] if flag not in ['-Werror=missing-prototypes', '-Wmissing-prototypes',
'-Werror=missing-declarations', '-Wmissing-declarations',
'-fvisibility=hidden']
test_cargs += flag test_cargs += flag
endif endif
endforeach endforeach

View File

@ -152,7 +152,9 @@ if os_unix
endif endif
foreach flag: common_cflags foreach flag: common_cflags
if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden'] if flag not in ['-Werror=missing-prototypes', '-Wmissing-prototypes',
'-Werror=missing-declarations', '-Wmissing-declarations',
'-fvisibility=hidden']
test_cargs += flag test_cargs += flag
endif endif
endforeach endforeach

View File

@ -2,7 +2,9 @@
reftest_cflags = [] reftest_cflags = []
foreach flag: common_cflags foreach flag: common_cflags
if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden'] if flag not in ['-Werror=missing-prototypes', '-Wmissing-prototypes',
'-Werror=missing-declarations', '-Wmissing-declarations',
'-fvisibility=hidden']
reftest_cflags += flag reftest_cflags += flag
endif endif
endforeach endforeach