summaryrefslogtreecommitdiff
path: root/config.mak.dev
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-10-18 03:05:22 -0400
committerJunio C Hamano <gitster@pobox.com>2018-10-19 10:24:11 +0900
commit36da893114e02b7f0a8ac5eeb5114dec129a4027 (patch)
tree9ee76022634574c71651f94577207f429d4e461f /config.mak.dev
parentcae598d9980661a978e2df4fb338518f7bf09572 (diff)
downloadgit-36da893114e02b7f0a8ac5eeb5114dec129a4027.tar.gz
config.mak.dev: enable -Wunused-function
We explicitly omitted -Wunused-function when we added -Wextra, but there is no need: the current code compiles cleanly with it. And it's worth having, since it can let you know when there are cascading effects from a cleanup (e.g., deleting one function lets you delete its static helpers). There are cases where we may need an unused function to exist, but we can handle these easily: - macro-generated code like commit-slab; there we have the MAYBE_UNUSED annotation to silence the compiler - conditional compilation, where we may or may not need a static helper. These generally fall into one of two categories: - the call should not be conditional, but rather the function body itself should be (and may just be a no-op on one side of the #if). That keeps the conditional pollution out of the main code. - call-chains of static helpers should all be in the same #if block, so they are all-or-nothing And if there's some case that doesn't cover, we still have MAYBE_UNUSED as a fallback. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.mak.dev')
-rw-r--r--config.mak.dev1
1 files changed, 0 insertions, 1 deletions
diff --git a/config.mak.dev b/config.mak.dev
index 9a998149d9..cbe8232047 100644
--- a/config.mak.dev
+++ b/config.mak.dev
@@ -33,7 +33,6 @@ ifeq ($(filter extra-all,$(DEVOPTS)),)
CFLAGS += -Wno-empty-body
CFLAGS += -Wno-missing-field-initializers
CFLAGS += -Wno-sign-compare
-CFLAGS += -Wno-unused-function
CFLAGS += -Wno-unused-parameter
endif
endif