diff --git a/subsys/testsuite/ztest/include/zephyr/ztest_assert.h b/subsys/testsuite/ztest/include/zephyr/ztest_assert.h index b3815871ffd39..6e72bb2de6df4 100644 --- a/subsys/testsuite/ztest/include/zephyr/ztest_assert.h +++ b/subsys/testsuite/ztest/include/zephyr/ztest_assert.h @@ -76,8 +76,9 @@ static inline bool z_zexpect_(bool cond, const char *file, int line) #else /* CONFIG_ZTEST_ASSERT_VERBOSE != 0 */ -static inline bool z_zassert(bool cond, const char *default_msg, const char *file, int line, - const char *func, const char *msg, ...) +static inline __printf_like(6, 7) bool z_zassert(bool cond, const char *default_msg, + const char *file, int line, const char *func, + const char *msg, ...) { if (cond == false) { va_list vargs; @@ -100,8 +101,9 @@ static inline bool z_zassert(bool cond, const char *default_msg, const char *fil return true; } -static inline bool z_zassume(bool cond, const char *default_msg, const char *file, int line, - const char *func, const char *msg, ...) +static inline __printf_like(6, 7) bool z_zassume(bool cond, const char *default_msg, + const char *file, int line, const char *func, + const char *msg, ...) { if (cond == false) { va_list vargs; @@ -124,8 +126,9 @@ static inline bool z_zassume(bool cond, const char *default_msg, const char *fil return true; } -static inline bool z_zexpect(bool cond, const char *default_msg, const char *file, int line, - const char *func, const char *msg, ...) +static inline __printf_like(6, 7) bool z_zexpect(bool cond, const char *default_msg, + const char *file, int line, const char *func, + const char *msg, ...) { if (cond == false) { va_list vargs;