From c447418c43747ffe27e68d205d5dd0075f9fac95 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 9 Nov 2016 12:59:18 +0000 Subject: [PATCH 1/5] Add more _DBUS_GNUC_PRINTF annotations Signed-off-by: Simon McVittie --- dbus/dbus-message.h | 2 +- test/internals/printf.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h index ac3e408..a4aeb5a 100644 --- a/dbus/dbus-message.h +++ b/dbus/dbus-message.h @@ -87,7 +87,7 @@ DBUS_EXPORT DBusMessage* dbus_message_new_error_printf (DBusMessage *reply_to, const char *error_name, const char *error_format, - ...); + ...) _DBUS_GNUC_PRINTF (3, 4); DBUS_EXPORT DBusMessage* dbus_message_copy (const DBusMessage *message); diff --git a/test/internals/printf.c b/test/internals/printf.c index 2006f32..fb8f355 100644 --- a/test/internals/printf.c +++ b/test/internals/printf.c @@ -34,6 +34,10 @@ #include #include +static void do_test (int minimum, + const char *format, + ...) _DBUS_GNUC_PRINTF (2, 3); + static void do_test (int minimum, const char *format, -- 2.10.2