diff options
author | Nico Huber <nico.h@gmx.de> | 2023-05-12 15:46:24 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-05-17 11:23:59 +0000 |
commit | 6a07db21b12b08c7b975921f2ee1196dd0ec92b3 (patch) | |
tree | 3b6fceda427aa70be42058500f337d39610bf09e /src/include | |
parent | feba51ba17b24e32fd9442310c05aaec2aa0de5f (diff) |
console: Add format-checking __printf() to die()
Code changes are necessary because `-Wformat` warns about empty
format strings by default.
Change-Id: Ic8021b70f4cd4875b06f196f88b84940c9a79fe0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75147
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/console/console.h | 2 |
1 files changed, 1 insertions, 1 deletions
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) |