bdk: utils: Set format attribute for s_printf

This allows the custom sprintf to be recognized as printf by gcc and effectively doing format checking.

NOTE: 64bit formatting is not supported for now, even if gcc asks to be set.
This commit is contained in:
CTCaer 2022-05-12 16:40:34 +03:00
parent 7df76bff4a
commit b6384d5da5

View file

@ -21,7 +21,7 @@
#include <utils/types.h>
void s_printf(char *out_buf, const char *fmt, ...);
void s_printf(char *out_buf, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
void s_vprintf(char *out_buf, const char *fmt, va_list ap);
#endif