* [PATCH] bootconfig: give the footer size static_assert a message
@ 2026-10-11 22:33 Sasha Levin
2026-10-12 3:34 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-10-11 22:33 UTC (permalink / raw)
To: Masami Hiramatsu, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Ben Hutchings
Cc: Sasha Levin, stable, linux-kernel, linux-trace-kernel, llvm
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.
Fixes: 6ed5e20466c79 ("bootconfig: Fix unaligned access when building footer")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 17d971d47f879..df05340358578 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;
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bootconfig: give the footer size static_assert a message
2026-10-11 22:33 [PATCH] bootconfig: give the footer size static_assert a message Sasha Levin
@ 2026-10-12 3:34 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2026-10-12 3:34 UTC (permalink / raw)
To: sashal
Cc: Masami Hiramatsu, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Ben Hutchings, Sasha Levin, stable,
linux-kernel, linux-trace-kernel, llvm
On Sun, 11 Oct 2026 18:33:41 -0400, Sasha Levin <sashal@kernel.org> wrote:
> 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.
>
> Fixes: 6ed5e20466c79 ("bootconfig: Fix unaligned access when building footer")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Sasha Levin <sashal@kernel.org>
Looks good to me. Let me pick it.
Thanks!
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-12 3:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-11 22:33 [PATCH] bootconfig: give the footer size static_assert a message Sasha Levin
2026-10-12 3:34 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®