From: Simon McVittie Date: Wed, 9 Nov 2016 12:59:18 +0000 (+0000) Subject: Add more _DBUS_GNUC_PRINTF annotations X-Git-Tag: dbus-1.11.8~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=259d2bcf593b455685cbd097021a758991c02580;p=thirdparty%2Fdbus.git Add more _DBUS_GNUC_PRINTF annotations Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98658 --- diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h index ac3e4087f..a4aeb5a12 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 2006f3211..fb8f35529 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,