diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/console.h | 2 | ||||
-rw-r--r-- | include/panic.h | 1 | ||||
-rw-r--r-- | include/printf.h | 1 | ||||
-rw-r--r-- | include/uart.h | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index 9246e92b25..555bd1588f 100644 --- a/include/console.h +++ b/include/console.h @@ -115,6 +115,7 @@ int cputs(enum console_channel channel, const char *outstr); * * @return non-zero if output was truncated. */ +__attribute__((__format__(__printf__, 2, 3))) int cprintf(enum console_channel channel, const char *format, ...); /** @@ -126,6 +127,7 @@ int cprintf(enum console_channel channel, const char *format, ...); * * @return non-zero if output was truncated. */ +__attribute__((__format__(__printf__, 2, 3))) int cprints(enum console_channel channel, const char *format, ...); /** diff --git a/include/panic.h b/include/panic.h index e25a68eccd..80a8fe1125 100644 --- a/include/panic.h +++ b/include/panic.h @@ -132,6 +132,7 @@ void panic_puts(const char *s); * @param format printf-style format string * @param ... Arguments to process */ +__attribute__((__format__(__printf__, 1, 2))) void panic_printf(const char *format, ...); /* diff --git a/include/printf.h b/include/printf.h index ccd477cfbd..60baba629d 100644 --- a/include/printf.h +++ b/include/printf.h @@ -86,6 +86,7 @@ __stdlib_compat int vfnprintf(int (*addchar)(void *context, int c), * @param format Format string * @return EC_SUCCESS, or EC_ERROR_OVERFLOW if the output was truncated. */ +__attribute__((__format__(__printf__, 3, 4))) __stdlib_compat int snprintf(char *str, int size, const char *format, ...); /** diff --git a/include/uart.h b/include/uart.h index a55c8fce2f..e333196d4a 100644 --- a/include/uart.h +++ b/include/uart.h @@ -63,6 +63,7 @@ int uart_put(const char *out, int len); * * @return EC_SUCCESS, or non-zero if output was truncated. */ +__attribute__((__format__(__printf__, 1, 2))) int uart_printf(const char *format, ...); /** |