bus: put the printf attribute in the header where it will do more good
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 2 Feb 2015 17:29:43 +0000 (17:29 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 3 Feb 2015 16:19:14 +0000 (16:19 +0000)
Now we can actually notice incorrect format strings in other
translation units.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810
Reviewed-by: Philip Withnall
bus/bus.c
bus/bus.h

index f51ee99..84e6a1f 100644 (file)
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -1325,9 +1325,6 @@ bus_context_get_initial_fd_limit (BusContext *context)
 }
 
 void
-bus_context_log (BusContext *context, DBusSystemLogSeverity severity, const char *msg, ...) _DBUS_GNUC_PRINTF (3, 4);
-
-void
 bus_context_log (BusContext *context, DBusSystemLogSeverity severity, const char *msg, ...)
 {
   va_list args;
index dac6ea5..d05c80f 100644 (file)
--- a/bus/bus.h
+++ b/bus/bus.h
@@ -120,7 +120,7 @@ DBusRLimit *      bus_context_get_initial_fd_limit               (BusContext
 void              bus_context_log                                (BusContext       *context,
                                                                   DBusSystemLogSeverity severity,
                                                                   const char       *msg,
-                                                                  ...);
+                                                                  ...) _DBUS_GNUC_PRINTF (3, 4);
 dbus_bool_t       bus_context_check_security_policy              (BusContext       *context,
                                                                   BusTransaction   *transaction,
                                                                   DBusConnection   *sender,