Add missing format attributes suggested by -Wsuggest-attribute=format

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Simon McVittie 2016-10-07 19:13:33 +01:00 committed by Simon McVittie
parent cba4fac6d3
commit 27b7e2b88a
4 changed files with 5 additions and 5 deletions

View file

@ -71,7 +71,7 @@ static security_id_t bus_sid = SECSID_WILD;
static pthread_t avc_notify_thread;
/* Prototypes for AVC callback functions. */
static void log_callback (const char *fmt, ...);
static void log_callback (const char *fmt, ...) _DBUS_GNUC_PRINTF (1, 2);
static void log_audit_callback (void *data, security_class_t class, char *buf, size_t bufleft);
static void *avc_create_thread (void (*run) (void));
static void avc_stop_thread (void *thread);

View file

@ -69,7 +69,7 @@ DBUS_EXPORT
void dbus_set_error (DBusError *error,
const char *name,
const char *message,
...);
...) _DBUS_GNUC_PRINTF (3, 4);
DBUS_EXPORT
void dbus_set_error_const (DBusError *error,
const char *name,

View file

@ -203,7 +203,7 @@ dbus_bool_t _dbus_string_append_printf (DBusString *str,
DBUS_PRIVATE_EXPORT
dbus_bool_t _dbus_string_append_printf_valist (DBusString *str,
const char *format,
va_list args);
va_list args) _DBUS_GNUC_PRINTF (2, 0);
dbus_bool_t _dbus_string_insert_2_aligned (DBusString *str,
int insert_at,
const unsigned char octets[2]);

View file

@ -483,7 +483,7 @@ void _dbus_exit (int code) _DBUS_GNUC_NORETURN;
DBUS_PRIVATE_EXPORT
int _dbus_printf_string_upper_bound (const char *format,
va_list args);
va_list args) _DBUS_GNUC_PRINTF (1, 0);
#ifdef DBUS_ENABLE_VERBOSE_MODE
DBUS_PRIVATE_EXPORT
@ -568,7 +568,7 @@ void _dbus_log (DBusSystemLogSeverity severity,
DBUS_PRIVATE_EXPORT
void _dbus_logv (DBusSystemLogSeverity severity,
const char *msg,
va_list args);
va_list args) _DBUS_GNUC_PRINTF (2, 0);
/* Define DBUS_VA_COPY() to do the right thing for copying va_list variables.
* config.h may have already defined DBUS_VA_COPY as va_copy or __va_copy.