From a1ddc2721467fb68241372db77657fd0dcf6cda5 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 11 Oct 2026 18:33:41 -0400 Subject: [PATCH] bootconfig: give the footer size static_assert a message static_assert() without a message is a C23 feature, so clang warns: main.c:498:56: warning: '_Static_assert' with no message is a C23 extension [-Wc23-extensions] Add a message. Link: http://lkml.kernel.org/r/20261011223358.2327625-13-sashal@kernel.org Fixes: 6ed5e20466c79 ("bootconfig: Fix unaligned access when building footer") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Sasha Levin Signed-off-by: Masami Hiramatsu (Google) --- tools/bootconfig/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c index 17d971d47f87..df0534035857 100644 --- a/tools/bootconfig/main.c +++ b/tools/bootconfig/main.c @@ -495,7 +495,8 @@ static int apply_xbc(const char *path, const char *xbc_path) footer.size = htole32(size); footer.csum = htole32(csum); memcpy(footer.magic, BOOTCONFIG_MAGIC, BOOTCONFIG_MAGIC_LEN); - static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE); + static_assert(sizeof(footer) == BOOTCONFIG_FOOTER_SIZE, + "bootconfig footer size mismatch"); memcpy(data + size, &footer, BOOTCONFIG_FOOTER_SIZE); total_size = size + BOOTCONFIG_FOOTER_SIZE;