diff options
author | Eric Engestrom <[email protected]> | 2019-09-23 17:21:20 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-10-24 14:54:09 +0100 |
commit | 8d43e2b2ded0fe3c82d49561cdab9f208f9e64b6 (patch) | |
tree | 735e6a15646d2aac3955d9f6fef961936b094a22 /meson.build | |
parent | 1177151b6d9312d6c72147f84261c3694aebdfaf (diff) |
meson: add -Werror=empty-body to disallow `if(x);`
This would have prevented a bug in MR 2058 [1]; with that MR fixed,
nothing else uses empty-body blocks, so let's just forbid them altogether.
[1] https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2058#note_237880
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meson.build b/meson.build index b4cd7999566..ac864819013 100644 --- a/meson.build +++ b/meson.build @@ -939,6 +939,7 @@ else '-Werror=implicit-function-declaration', '-Werror=missing-prototypes', '-Werror=return-type', + '-Werror=empty-body', '-Werror=incompatible-pointer-types', '-Wno-missing-field-initializers', '-Wno-format-truncation', @@ -958,6 +959,7 @@ else _trial = [ '-Werror=return-type', + '-Werror=empty-body', '-Wno-non-virtual-dtor', '-Wno-missing-field-initializers', '-Wno-format-truncation', |