From 5b89e2a839b9d778cc9e4bdc156243f826e26b2b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 2 Feb 2015 17:29:43 +0000 Subject: [PATCH] bus: put the printf attribute in the header where it will do more good Now we can actually notice incorrect format strings in other translation units. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88810 Reviewed-by: Philip Withnall --- bus/bus.c | 3 --- bus/bus.h | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bus/bus.c b/bus/bus.c index f51ee99..84e6a1f 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -1325,9 +1325,6 @@ bus_context_get_initial_fd_limit (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/bus/bus.h b/bus/bus.h index dac6ea5..d05c80f 100644 --- a/bus/bus.h +++ b/bus/bus.h @@ -120,7 +120,7 @@ DBusRLimit * bus_context_get_initial_fd_limit (BusContext void bus_context_log (BusContext *context, DBusSystemLogSeverity severity, const char *msg, - ...); + ...) _DBUS_GNUC_PRINTF (3, 4); dbus_bool_t bus_context_check_security_policy (BusContext *context, BusTransaction *transaction, DBusConnection *sender, -- 2.7.4