From 68227164286289795b7abc79ed439e3fe7622a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Redon?= Date: Mon, 21 May 2018 17:18:21 +0200 Subject: [PATCH] add printf attribute declaration to remove warning the __attribute__ ((format (printf, 1, 0))) declaration remove the following compilation warning: warning: function 'osmo_panic' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] osmo_panic_default(fmt, args); --- firmware/libosmocore/source/panic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firmware/libosmocore/source/panic.c b/firmware/libosmocore/source/panic.c index 9368b700..74243b00 100644 --- a/firmware/libosmocore/source/panic.c +++ b/firmware/libosmocore/source/panic.c @@ -43,6 +43,7 @@ static osmo_panic_handler_t osmo_panic_handler = (void*)0; #include #include +__attribute__ ((format (printf, 1, 0))) static void osmo_panic_default(const char *fmt, va_list args) { vfprintf(stderr, fmt, args); @@ -73,6 +74,7 @@ static void osmo_panic_default(const char *fmt, va_list args) * The default function on most systems will generate a backtrace and * then abort() the process. */ +__attribute__ ((format (printf, 1, 0))) void osmo_panic(const char *fmt, ...) { va_list args;