summaryrefslogtreecommitdiff
path: root/Makefile.mk
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-05-28 06:07:27 +0200
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2024-05-29 08:19:02 +0000
commitb3db3abd6311924930f3250c9f9fc3157fbbf7da (patch)
tree4004aae5988bf2a8b9a33fc39fbbb5d7000cd3a4 /Makefile.mk
parent877fafab57affc34d7e4636938b180fcc5c30e9c (diff)
tree: Use Wcalloc-transposed-args command option
GCC-14 documentation says "The first argument to calloc is documented to be number of elements in array, while the second argument is size of each element, so calloc(n, sizeof (int)) is preferred over calloc(sizeof(int), n)." Change-Id: I77b6f4d2eda487b087ba5665b588999633c33e8d Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82658 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'Makefile.mk')
-rw-r--r--Makefile.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.mk b/Makefile.mk
index 0358c8833f..e406702552 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -502,6 +502,7 @@ CFLAGS_common += -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie
CFLAGS_common += -Wstring-compare
ifeq ($(CONFIG_COMPILER_GCC),y)
CFLAGS_common += -Wold-style-declaration -Wflex-array-member-not-at-end
+CFLAGS_common += -Wcalloc-transposed-args
# Don't add these GCC specific flags when running scan-build
ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
CFLAGS_common += -Wno-packed-not-aligned