summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-03-22 10:38:12 -0400
committerColin Walters <walters@verbum.org>2010-03-22 13:58:43 -0400
commit03bb3ce656e9b14fe643572dd0d39f82e955f1f5 (patch)
tree9956499c63f4a947d783fe5ee300abc79d958ff5
parentc4371e4bc8a561cf91516d22f00c9512dc7e8e53 (diff)
downloaddbus-03bb3ce656e9b14fe643572dd0d39f82e955f1f5.tar.gz
Add DBUS_GNUC_PRINTF checks to new formatting functions
Otherwise we don't get GCC warnings.
-rw-r--r--bus/bus.c3
-rw-r--r--dbus/dbus-sysdeps.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/bus/bus.c b/bus/bus.c
index 60de72af..fd8a8724 100644
--- 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;
diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h
index 12e9124e..7817e04f 100644
--- a/dbus/dbus-sysdeps.h
+++ b/dbus/dbus-sysdeps.h
@@ -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.