Add more _DBUS_GNUC_PRINTF annotations
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 9 Nov 2016 12:59:18 +0000 (12:59 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 10 Nov 2016 11:46:33 +0000 (11:46 +0000)
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98658

dbus/dbus-message.h
test/internals/printf.c

index ac3e408..a4aeb5a 100644 (file)
@@ -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);
index 2006f32..fb8f355 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
+static void do_test (int minimum,
+                     const char *format,
+                     ...) _DBUS_GNUC_PRINTF (2, 3);
+
 static void
 do_test (int minimum,
     const char *format,