]> xenbits.xensource.com Git - xen.git/commitdiff
xen: Use -Wflex-array-member-not-at-end when available
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 13 Jan 2024 17:40:48 +0000 (17:40 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 May 2024 23:13:43 +0000 (00:13 +0100)
This option is new in GCC-14, and maps to MISRA Rule 1.1.  The codebase is
clean to it, and Eclair is blocking.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/Makefile

index b6c39fc6aefb8cc06edfb18b76d61570fe4cf92a..71f0cb5071b3c25cca6dd01afeea21d5ae6c7e53 100644 (file)
@@ -396,6 +396,7 @@ CFLAGS += -nostdinc -fno-builtin -fno-common
 CFLAGS += -Werror -Wredundant-decls -Wwrite-strings -Wno-pointer-arith
 CFLAGS += -Wdeclaration-after-statement
 $(call cc-option-add,CFLAGS,CC,-Wvla)
+$(call cc-option-add,CFLAGS,CC,-Wflex-array-member-not-at-end)
 CFLAGS += -pipe -D__XEN__ -include $(srctree)/include/xen/config.h
 CFLAGS-$(CONFIG_DEBUG_INFO) += -g