From 6a07db21b12b08c7b975921f2ee1196dd0ec92b3 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 12 May 2023 15:46:24 +0200 Subject: console: Add format-checking __printf() to die() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code changes are necessary because `-Wformat` warns about empty format strings by default. Change-Id: Ic8021b70f4cd4875b06f196f88b84940c9a79fe0 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/coreboot/+/75147 Reviewed-by: Jérémy Compostella Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Arthur Heymans --- src/include/console/console.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include/console/console.h') diff --git a/src/include/console/console.h b/src/include/console/console.h index c69efcde40..fb257ba16c 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -18,7 +18,7 @@ void mainboard_post(u8 value); void arch_post_code(u8 value); void soc_post_code(uint8_t value); -void __noreturn die(const char *fmt, ...); +void __noreturn __printf(1, 2) die(const char *fmt, ...); #define die_with_post_code(value, fmt, ...) \ do { post_code(value); die(fmt, ##__VA_ARGS__); } while (0) -- cgit v1.2.3