summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-01-14 14:10:57 +0100
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2024-01-09 23:23:34 +0000
commit3d883ba606750d8110203da0bf44234a853826e4 (patch)
tree93d7a85c07c2a170a9c5b1152bcb6e274854676a
parentd74ee60f71fd45449cd710a58a7f2ca9fae2ca49 (diff)
Makefile.inc: Enable Wold-style-declaration command option
Warn for obsolescent usages, according to the C Standard, in a declaration. For example, warn if storage-class specifiers like static are not the first things in a declaration. Change-Id: Ida3fa59edb07e4105ef3cfb6a20cb29680699586 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71892 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
-rw-r--r--Makefile.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 44cd0eaeb6..23f56a4d73 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -498,6 +498,7 @@ CFLAGS_common += -Wdangling-else -Wmissing-include-dirs
CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
CFLAGS_common += -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie
ifeq ($(CONFIG_COMPILER_GCC),y)
+CFLAGS_common += -Wold-style-declaration
# Don't add these GCC specific flags when running scan-build
ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
CFLAGS_common += -Wno-packed-not-aligned