Browse Source

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 <armin.brauns@embedded-solutions.at>
pull/62347/head
Armin Brauns 2 years ago committed by Carles Cufí
parent
commit
d7846de548
  1. 2
      include/zephyr/sys/__assert.h

2
include/zephyr/sys/__assert.h

@ -26,7 +26,7 @@ extern "C" { @@ -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
}

Loading…
Cancel
Save