]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Add missing format attributes suggested by -Wsuggest-attribute=format
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 7 Oct 2016 18:13:33 +0000 (19:13 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 13 Oct 2016 21:44:13 +0000 (22:44 +0100)
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/selinux.c
dbus/dbus-errors.h
dbus/dbus-string.h
dbus/dbus-sysdeps.h

index a904f0a0282ed006b5b194ebcbea9f41618eba4a..16791c8392842079715da5dbfe570d489b726ec6 100644 (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);
index e63139a011450b99a33658f9fcf361bc4d2ee067..3804085b9e2fe9b06be494dc37a2f42d37238f85 100644 (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,
index ae2a2380a5173cc36fc7faa818122140ac3c1635..1c01770209acb49ef5c5b976525210c8c606865d 100644 (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]);
index 3387347b110cc5f0c22e163c3bde8a8eec82a4a0..2ef4bf2c9e6bfd150fe403683cbb3ecd33b4a065 100644 (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.