From 0f9de11a11644b77cc60d6ff6ac4519d2e5c29e1 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 26 Jan 2023 14:21:02 +0100 Subject: *: apply proper format string attributes So that we get warnings about broken format strings. Signed-off-by: David Lamparter --- lib/ferr.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/ferr.h') diff --git a/lib/ferr.h b/lib/ferr.h index c27601f66c..9accde1697 100644 --- a/lib/ferr.h +++ b/lib/ferr.h @@ -178,10 +178,12 @@ ferr_r ferr_clear(void); /* do NOT call these functions directly. only for macro use! */ ferr_r ferr_set_internal(const char *file, int line, const char *func, - enum ferr_kind kind, const char *text, ...); + enum ferr_kind kind, const char *text, ...) + PRINTFRR(5, 6); ferr_r ferr_set_internal_ext(const char *file, int line, const char *func, enum ferr_kind kind, const char *pathname, - int errno_val, const char *text, ...); + int errno_val, const char *text, ...) + PRINTFRR(7, 8); #define ferr_ok() 0 @@ -221,7 +223,8 @@ ferr_r ferr_set_internal_ext(const char *file, int line, const char *func, #include "vty.h" /* print error message to vty; $ERR is replaced by the error's message */ -void vty_print_error(struct vty *vty, ferr_r err, const char *msg, ...); +void vty_print_error(struct vty *vty, ferr_r err, const char *msg, ...) + PRINTFRR(3, 4); #define CMD_FERR_DO(func, action, ...) \ do { \ -- cgit v1.2.3