Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/82658?usp=email )
Change subject: tree: Use Wcalloc-transposed-args command option ......................................................................
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). If sizeof in the earlier argument and not the latter is intentional, the warning can be suppressed by using calloc(sizeof(struct S) + 0, n) or calloc(1 * sizeof(struct S), 4) or using sizeof in the later argument as well."
Change-Id: I77b6f4d2eda487b087ba5665b588999633c33e8d Signed-off-by: Elyes Haouas ehaouas@noos.fr --- M Makefile.mk 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/82658/1
diff --git a/Makefile.mk b/Makefile.mk index e642ac7..97de077 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -501,7 +501,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 +CFLAGS_common += -Wold-style-declaration -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