[glib] gdbusmessage: Add missing G_GNUC_PRINTF attribute



commit ff327ba2d73d2ff175b402ab4da3ab7a61e1644e
Author: Philip Withnall <withnall endlessm com>
Date:   Tue Mar 14 12:55:08 2017 +0000

    gdbusmessage: Add missing G_GNUC_PRINTF attribute
    
    This highlighted a bug in GDBusConnection, where an interface name was
    not included in a message referring to it.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780032

 gio/gdbusconnection.c |    2 +-
 gio/gdbusmessage.h    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 96a40ac..8981468 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -4606,7 +4606,7 @@ handle_get_all_properties (GDBusConnection *connection,
       GDBusMessage *reply;
       reply = g_dbus_message_new_method_error (message,
                                                "org.freedesktop.DBus.Error.InvalidArgs",
-                                               _("No such interface"),
+                                               _("No such interface ā€˜%sā€™"),
                                                interface_name);
       g_dbus_connection_send_message_unlocked (eo->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, 
NULL);
       g_object_unref (reply);
diff --git a/gio/gdbusmessage.h b/gio/gdbusmessage.h
index f791889..bd3e8e9 100644
--- a/gio/gdbusmessage.h
+++ b/gio/gdbusmessage.h
@@ -52,7 +52,7 @@ GLIB_AVAILABLE_IN_ALL
 GDBusMessage             *g_dbus_message_new_method_error   (GDBusMessage             *method_call_message,
                                                              const gchar              *error_name,
                                                              const gchar              *error_message_format,
-                                                             ...);
+                                                             ...) G_GNUC_PRINTF(3, 4);
 GLIB_AVAILABLE_IN_ALL
 GDBusMessage             *g_dbus_message_new_method_error_valist (GDBusMessage             
*method_call_message,
                                                                   const gchar              *error_name,


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