From d7846de5482f21d042b77f04c8d051259da1b4f5 Mon Sep 17 00:00:00 2001 From: Armin Brauns Date: Wed, 19 Jul 2023 08:15:04 +0000 Subject: [PATCH] assert: check format arguments for correctness This instructs the compiler to check that arguments to __ASSERT/__ASSERT_NO_MSG are valid for printf. Signed-off-by: Armin Brauns --- include/zephyr/sys/__assert.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zephyr/sys/__assert.h b/include/zephyr/sys/__assert.h index 1fa0b86daa8..fc0b9476ea6 100644 --- a/include/zephyr/sys/__assert.h +++ b/include/zephyr/sys/__assert.h @@ -26,7 +26,7 @@ extern "C" { #endif /* Wrapper around printk to avoid including printk.h in assert.h */ -void assert_print(const char *fmt, ...); +void __printf_like(1, 2) assert_print(const char *fmt, ...); #ifdef __cplusplus }