From 3d883ba606750d8110203da0bf44234a853826e4 Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Sat, 14 Jan 2023 14:10:57 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71892 Reviewed-by: Martin L Roth Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- Makefile.inc | 1 + 1 file changed, 1 insertion(+) 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