Merge pull request #11011 from Mic92/compiler-checks

enable -Werror=unused-result
This commit is contained in:
John Ericson 2024-07-02 09:23:03 -04:00 committed by GitHub
commit f809edba4f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 2 deletions

View file

@ -92,7 +92,7 @@ ifdef HOST_WINDOWS
GLOBAL_LDFLAGS += -Wl,--export-all-symbols
endif
GLOBAL_CXXFLAGS += -g -Wall -Wdeprecated-copy -Wignored-qualifiers -Wimplicit-fallthrough -include $(buildprefix)config.h -std=c++2a -I src
GLOBAL_CXXFLAGS += -g -Wall -Wdeprecated-copy -Wignored-qualifiers -Wimplicit-fallthrough -Werror=unused-result -include $(buildprefix)config.h -std=c++2a -I src
# Include the main lib, causing rules to be defined

View file

@ -58,6 +58,7 @@ add_project_arguments(
'-Wimplicit-fallthrough',
'-Werror=switch',
'-Werror=switch-enum',
'-Werror=unused-result',
'-Wdeprecated-copy',
'-Wignored-qualifiers',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked

View file

@ -164,6 +164,7 @@ add_project_arguments(
'-Wimplicit-fallthrough',
'-Werror=switch',
'-Werror=switch-enum',
'-Werror=unused-result',
'-Wdeprecated-copy',
'-Wignored-qualifiers',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked

View file

@ -34,6 +34,7 @@ add_project_arguments(
'-Wimplicit-fallthrough',
'-Werror=switch',
'-Werror=switch-enum',
'-Werror=unused-result',
'-Wdeprecated-copy',
'-Wignored-qualifiers',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked

View file

@ -143,6 +143,7 @@ add_project_arguments(
'-Wimplicit-fallthrough',
'-Werror=switch',
'-Werror=switch-enum',
'-Werror=unused-result',
'-Wdeprecated-copy',
'-Wignored-qualifiers',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked

View file

@ -23,11 +23,14 @@ nix_perl_conf.set('PACKAGE_VERSION', meson.project_version())
# set error arguments
#-------------------------------------------------
error_args = [
'-Werror=unused-result',
'-Wdeprecated-copy',
'-Wdeprecated-declarations',
'-Wignored-qualifiers',
'-Wno-pedantic',
'-Wno-non-virtual-dtor',
'-Wno-unused-parameter',
'-Wno-variadic-macros',
'-Wdeprecated-declarations',
'-Wno-missing-field-initializers',
'-Wno-unknown-warning-option',
'-Wno-unused-variable',

View file

@ -28,6 +28,7 @@ add_project_arguments(
'-Wimplicit-fallthrough',
'-Werror=switch',
'-Werror=switch-enum',
'-Werror=unused-result',
'-Wdeprecated-copy',
'-Wignored-qualifiers',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked

View file

@ -34,6 +34,7 @@ add_project_arguments(
'-Wimplicit-fallthrough',
'-Werror=switch',
'-Werror=switch-enum',
'-Werror=unused-result',
'-Wdeprecated-copy',
'-Wignored-qualifiers',
# Enable assertions in libstdc++ by default. Harmless on libc++. Benchmarked