From 1bc4bf063adf57a17e5d6d8dc6399f03080a0566 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 9 Mar 2021 17:15:53 -0500 Subject: 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 --- Cryptlib/OpenSSL/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Cryptlib/OpenSSL') diff --git a/Cryptlib/OpenSSL/Makefile b/Cryptlib/OpenSSL/Makefile index 1b8ca318..2b96c385 100644 --- a/Cryptlib/OpenSSL/Makefile +++ b/Cryptlib/OpenSSL/Makefile @@ -20,10 +20,11 @@ INCLUDES = -I$(OSSLDIR) -I$(CRYPTDIR) -I$(OSSLDIR)/Include/ \ FEATUREFLAGS += -nostdinc -WERRFLAGS += -Wno-error=discarded-qualifiers \ - -Wno-error=maybe-uninitialized \ - -Wno-error=unused-function \ - -Wno-error=unused-but-set-variable +WARNFLAGS += -Wno-empty-body \ + -Wno-implicit-fallthrough \ + -Wno-old-style-declaration \ + -Wno-unused-but-set-variable \ + -Wno-unused-parameter CFLAGS = $(FEATUREFLAGS) \ $(OPTIMIZATIONS) \ -- cgit v1.2.3