[glib: 23/30] gdbusprivate: Avoid a warning about a statement with no effect




commit 0604f5858259c32744e6fc912ed4feb308651a3a
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon Nov 16 14:47:23 2020 +0000

    gdbusprivate: Avoid a warning about a statement with no effect
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 gio/gdbusprivate.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
index 99b37f3eb..4e42c1a4d 100644
--- a/gio/gdbusprivate.c
+++ b/gio/gdbusprivate.c
@@ -1945,11 +1945,10 @@ _g_dbus_initialize (void)
 
   if (g_once_init_enter (&initialized))
     {
-      GQuark g_dbus_error_domain;
       const gchar *debug;
 
-      g_dbus_error_domain = G_DBUS_ERROR;
-      (g_dbus_error_domain); /* To avoid -Wunused-but-set-variable */
+      /* Ensure the domain is registered. */
+      g_dbus_error_quark ();
 
       debug = g_getenv ("G_DBUS_DEBUG");
       if (debug != NULL)


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