From 03bb3ce656e9b14fe643572dd0d39f82e955f1f5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 22 Mar 2010 10:38:12 -0400 Subject: [PATCH] Add DBUS_GNUC_PRINTF checks to new formatting functions Otherwise we don't get GCC warnings. --- bus/bus.c | 3 +++ dbus/dbus-sysdeps.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bus/bus.c b/bus/bus.c index 60de72a..fd8a872 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 12e9124..7817e04 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. -- 2.7.4