]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
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 60de72af6259e919df48494535e64d00750e2d9c..fd8a87244b18aff730d0e4997d4966b65b5932af 100644 (file)
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -1175,6 +1175,9 @@ bus_context_get_reply_timeout (BusContext *context)
   return context->limits.reply_timeout;
 }
 
+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, ...)
 {
index 12e9124eed89e252bd8c721da1c9d07bb9853f96..7817e04fb5bbd94ad99d6aa71332d330d621f6b3 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.