summaryrefslogtreecommitdiff
path: root/Make.defaults
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-03-09 17:15:53 -0500
committerPeter Jones <pjones@redhat.com>2021-03-10 15:54:20 -0500
commit1bc4bf063adf57a17e5d6d8dc6399f03080a0566 (patch)
treec0de18317bbaa3902c11123c803736b8870f557b /Make.defaults
parentf5493df9c626a7436803d1e68b0118f4d041e0fa (diff)
downloadefi-boot-shim-1bc4bf063adf57a17e5d6d8dc6399f03080a0566.tar.gz
efi-boot-shim-1bc4bf063adf57a17e5d6d8dc6399f03080a0566.zip
make: use -Wextra (minus some obnoxious bits)
gcc -Wextra, has a lot of good, useful checks, a few obnoxious checks, and a few absolutely insane checks. This enables -Wextra, but disables -Wmissing-field-initializers, because it is irrational nonsense that just leads to worse code. It also disables some specific things in the Cryptlib and Cryptlib/OpenSSL trees: Both: -Wno-unused-parameter - there are a fair number of functions that have to conform to some API or another but have arguments that are unused, but haven't been marked with UNUSED; we don't need to see warnings about them. Cryptlib/OpenSSL: -Wno-empty-body - functions that exist merely to populate some API -Wno-implicit-fallthrough - these probably should get fixed someday, but I bet upstream will do it and rebasing will solve it -Wno-old-style-declaration - this gripes if you write "const static" instead of "static const". Again I expect rebasing will fix it at some point. -Wno-unused-but-set-variable - self explanatory, and again, I expect a rebase to solve it someday. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'Make.defaults')
-rw-r--r--Make.defaults8
1 files changed, 5 insertions, 3 deletions
diff --git a/Make.defaults b/Make.defaults
index f956c005..20aa8cd4 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -118,12 +118,12 @@ $(call conditional-add-flag,$(COLOR),diagnostics-color,FEATUREFLAGS,-fdiagnostic
override DEFAULT_WARNFLAGS = \
-Wall \
- -Wsign-compare
+ -Wextra \
+ -Wno-missing-field-initializers
$(call update-variable,WARNFLAGS)
override DEFAULT_WERRFLAGS = \
- -Werror \
- -Werror=sign-compare
+ -Werror
$(call update-variable,WERRFLAGS)
CFLAGS = $(FEATUREFLAGS) \
@@ -186,3 +186,5 @@ endif
ifneq ($(VERBOSE),)
export VERBOSE
endif
+
+# vim:filetype=make