[gnome-session] Add some G_GNUC_PRINTF annotations



commit a1136a42ea98d63645fdece63b1c1898c6d44686
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Dec 11 01:30:50 2013 -0500

    Add some G_GNUC_PRINTF annotations
    
    Fix clang build with -Werror=format-nonliteral.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720231

 gnome-session/gsm-dbus-client.c |    6 ++++++
 gnome-session/gsm-util.h        |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gnome-session/gsm-dbus-client.c b/gnome-session/gsm-dbus-client.c
index 34dd238..dcf7a46 100644
--- a/gnome-session/gsm-dbus-client.c
+++ b/gnome-session/gsm-dbus-client.c
@@ -120,6 +120,12 @@ static void
 raise_error (DBusConnection *connection,
              DBusMessage    *in_reply_to,
              const char     *error_name,
+             char           *format, ...) G_GNUC_PRINTF (4, 5);
+
+static void
+raise_error (DBusConnection *connection,
+             DBusMessage    *in_reply_to,
+             const char     *error_name,
              char           *format, ...)
 {
         char         buf[512];
diff --git a/gnome-session/gsm-util.h b/gnome-session/gsm-util.h
index 38dbe7b..ee54206 100644
--- a/gnome-session/gsm-util.h
+++ b/gnome-session/gsm-util.h
@@ -47,7 +47,7 @@ const char *gsm_util_get_current_desktop            (void);
 gboolean    gsm_util_text_is_blank                  (const char *str);
 
 void        gsm_util_init_error                     (gboolean    fatal,
-                                                     const char *format, ...);
+                                                     const char *format, ...) G_GNUC_PRINTF (2, 3);
 
 char *      gsm_util_generate_startup_id            (void);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]