From 9564b3c1e2566deb9f43f152a51d02f51d004e1f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 22 Jul 2021 15:25:03 +1000 Subject: [PATCH] Mark some functions as printf-like to silence some compiler warnings Signed-off-by: Peter Hutterer --- test/test-device.c | 1 + tools/libinput-debug-tablet.c | 1 + tools/libinput-quirks.c | 1 + 3 files changed, 3 insertions(+) diff --git a/test/test-device.c b/test/test-device.c index 2d7ed71e..57631f1d 100644 --- a/test/test-device.c +++ b/test/test-device.c @@ -1421,6 +1421,7 @@ END_TEST char *debug_messages[64] = { NULL }; +LIBINPUT_ATTRIBUTE_PRINTF(3, 0) static void debug_log_handler(struct libinput *libinput, enum libinput_log_priority priority, diff --git a/tools/libinput-debug-tablet.c b/tools/libinput-debug-tablet.c index ceaee1d1..73948de2 100644 --- a/tools/libinput-debug-tablet.c +++ b/tools/libinput-debug-tablet.c @@ -72,6 +72,7 @@ struct context { } abs; }; +LIBINPUT_ATTRIBUTE_PRINTF(1, 2) static void print_line(const char *format, ...) { diff --git a/tools/libinput-quirks.c b/tools/libinput-quirks.c index 173e5c22..047eb041 100644 --- a/tools/libinput-quirks.c +++ b/tools/libinput-quirks.c @@ -35,6 +35,7 @@ static bool verbose = false; +LIBINPUT_ATTRIBUTE_PRINTF(3, 0) static void log_handler(struct libinput *this_is_null, enum libinput_log_priority priority,