From: Colin Walters Date: Mon, 22 Mar 2010 14:38:12 +0000 (-0400) Subject: Add DBUS_GNUC_PRINTF checks to new formatting functions X-Git-Tag: dbus-1.2.24~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=03bb3ce656e9b14fe643572dd0d39f82e955f1f5;p=thirdparty%2Fdbus.git Add DBUS_GNUC_PRINTF checks to new formatting functions Otherwise we don't get GCC warnings. --- diff --git a/bus/bus.c b/bus/bus.c index 60de72af6..fd8a87244 100644 --- 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, ...) { diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 12e9124ee..7817e04fb 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.