[glib: 6/7] Fix signedness warning in gio/tests/gdbus-test-codegen.c




commit 4d1f76ec50746fa4bf6549bad645527f01957074
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu Nov 19 20:05:07 2020 +0100

    Fix signedness warning in gio/tests/gdbus-test-codegen.c
    
    gio/tests/gdbus-test-codegen.c: In function ‘check_object_manager’:
    gio/tests/gdbus-test-codegen.c:2344:20: error: comparison of integer expressions of different signedness: 
‘guint’ {aka ‘unsigned int’} and ‘int’
     2344 |   if (om_signal_id != -1)
          |                    ^~

 gio/tests/gdbus-test-codegen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c
index 36be37b72..0681e7ec8 100644
--- a/gio/tests/gdbus-test-codegen.c
+++ b/gio/tests/gdbus-test-codegen.c
@@ -1920,7 +1920,7 @@ check_object_manager (void)
   GError *error;
   GMainLoop *loop;
   OMData *om_data = NULL;
-  guint om_signal_id = -1;
+  guint om_signal_id = 0;
   GDBusObjectManager *pm = NULL;
   GList *object_proxies;
   GList *proxies;
@@ -2356,7 +2356,7 @@ check_object_manager (void)
   if (loop != NULL)
     g_main_loop_unref (loop);
 
-  if (om_signal_id != -1)
+  if (om_signal_id != 0)
     g_dbus_connection_signal_unsubscribe (c, om_signal_id);
   g_clear_object (&o3);
   g_clear_object (&o2);


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