Add DBUS_GNUC_PRINTF checks to new formatting functions
authorColin Walters <walters@verbum.org>
Mon, 22 Mar 2010 14:38:12 +0000 (10:38 -0400)
committerColin Walters <walters@verbum.org>
Mon, 22 Mar 2010 17:58:43 +0000 (13:58 -0400)
Otherwise we don't get GCC warnings.

bus/bus.c
dbus/dbus-sysdeps.h

index 60de72a..fd8a872 100644 (file)
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -1176,6 +1176,9 @@ bus_context_get_reply_timeout (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 12e9124..7817e04 100644 (file)
@@ -446,7 +446,7 @@ typedef enum {
   DBUS_SYSTEM_LOG_FATAL
 } DBusSystemLogSeverity;
 
-void _dbus_system_log (DBusSystemLogSeverity severity, const char *msg, ...);
+void _dbus_system_log (DBusSystemLogSeverity severity, const char *msg, ...) _DBUS_GNUC_PRINTF (2, 3);
 void _dbus_system_logv (DBusSystemLogSeverity severity, const char *msg, va_list args);
 
 /* Define DBUS_VA_COPY() to do the right thing for copying va_list variables.