summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-09-09 22:36:21 +0200
committerraveit65 <[email protected]>2019-09-15 10:21:47 +0200
commitf14af86aa11acfdf6833fe0f8349f2ad47bb1f6d (patch)
tree92ea21f643801a2b257d8fa2bc2b06e6a54865f2 /meson.build
parentabff3730fe5be92164dd00dfc36ebc60a73f233c (diff)
downloadmarco-f14af86aa11acfdf6833fe0f8349f2ad47bb1f6d.tar.bz2
marco-f14af86aa11acfdf6833fe0f8349f2ad47bb1f6d.tar.xz
build: add --enable-more-warnings configure flag
- Remove -ansi from CFLAGS. - By default, CFLAGS: -Wall -Wcast-align -Wchar-subscripts -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wsign-compare -Wshadow - If --enable-more-warnings, add -Wextra to CFLAGS. - Requires autoconf-archive package.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index d93f0b9a..3a9abca6 100644
--- a/meson.build
+++ b/meson.build
@@ -56,6 +56,7 @@ test_args = [
#'-Wformat=2',
#'-Wformat-nonliteral',
#'-Wformat-security',
+ ['-Werror=format-security', '-Werror=format=2'],
#'-Wformat-signedness',
#'-Wignored-qualifiers',
#'-Wimplicit-function-declaration',
@@ -90,13 +91,13 @@ test_args = [
#'-Wunused-but-set-variable',
#'-Wwrite-strings'
'-Wall',
- '-ansi',
+ #'-ansi',
]
cc = meson.get_compiler('c')
foreach arg: test_args
- if cc.has_argument(arg)
+ if cc.has_multi_arguments(arg)
add_project_arguments(arg, language : 'c')
endif
endforeach