summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-09 13:12:52 +0200
committerFilipe Brandenburger <filbranden@google.com>2018-06-09 21:42:30 +0200
commitb05ecb8cadd8c32d31b1aabcff4e507bd89b5465 (patch)
tree2a4b67e57d84fcb2615ada87b0007dd71fb8f15c /meson.build
parentMerge pull request #9240 from poettering/ds-validate (diff)
downloadsystemd-b05ecb8cadd8c32d31b1aabcff4e507bd89b5465.tar.xz
systemd-b05ecb8cadd8c32d31b1aabcff4e507bd89b5465.zip
meson: do not allow bit-shift overflows
The primary motivation is to catch enum values created through a shift that is too big: ../src/test/test-sizeof.c:26:29: error: left shift count >= width of type [-Werror=shift-count-overflow] enum_with_shift = 1 << 32, ^~ cc1: some warnings being treated as errors The compiler will now reject those. This is an alternative to #9224.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index a4c2368df9..29ee446d56 100644
--- a/meson.build
+++ b/meson.build
@@ -319,6 +319,7 @@ possible_cc_flags = [
'-Wstrict-aliasing=2',
'-Wwrite-strings',
'-Werror=overflow',
+ '-Werror=shift-count-overflow',
'-Wdate-time',
'-Wnested-externs',
'-ffast-math',