From 8608eccf9a9ab05d4c25c4b1ee8f558d8fe2ff72 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 19 Nov 2020 20:24:18 +0100 Subject: [PATCH 1/8] Fix signedness warning in gio/tests/file.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/file.c: In function ‘written_cb’: gio/tests/file.c:358:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} 358 | if (data->pos < strlen (data->data)) | ^ --- gio/tests/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/file.c b/gio/tests/file.c index 7f5ee8e78..7e99601fa 100644 --- a/gio/tests/file.c +++ b/gio/tests/file.c @@ -174,7 +174,7 @@ typedef struct gint monitor_deleted; gint monitor_changed; gchar *monitor_path; - gint pos; + gsize pos; const gchar *data; gchar *buffer; guint timeout; From e7aec308e9a6fe5eab990ee332edfe1241b15d76 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 19 Nov 2020 20:38:24 +0100 Subject: [PATCH 2/8] Fix signedness warning in gio/tests/proxy-test.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/proxy-test.c: In function ‘do_echo_test’: gio/tests/proxy-test.c:855:25: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’} 855 | for (total = 0; total < nwrote; total += nread) | ^ --- gio/tests/proxy-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gio/tests/proxy-test.c b/gio/tests/proxy-test.c index e3c0d09c7..eec4bf7ca 100644 --- a/gio/tests/proxy-test.c +++ b/gio/tests/proxy-test.c @@ -842,8 +842,8 @@ do_echo_test (GSocketConnection *conn) GIOStream *iostream = G_IO_STREAM (conn); GInputStream *istream = g_io_stream_get_input_stream (iostream); GOutputStream *ostream = g_io_stream_get_output_stream (iostream); - gssize nread, total; - gsize nwrote; + gssize nread; + gsize nwrote, total; gchar buf[128]; GError *error = NULL; From c3c1f6c4b9da0f5e6dca81fd6cde74fc1466e6ff Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 19 Nov 2020 20:45:14 +0100 Subject: [PATCH 3/8] Fix signedness warning in gio/tests/mimeapps.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/mimeapps.c: In function ‘strv_equal’: gio/tests/mimeapps.c:31:32: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’} 31 | res = g_strv_length (strv) == count; | ^~ --- gio/tests/mimeapps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/mimeapps.c b/gio/tests/mimeapps.c index 08bcce247..6d7785299 100644 --- a/gio/tests/mimeapps.c +++ b/gio/tests/mimeapps.c @@ -5,7 +5,7 @@ static gboolean strv_equal (gchar **strv, ...) { - gint count; + gsize count; va_list list; const gchar *str; gboolean res; From 5133acdaff46c59dff59823bae9e132feb673b69 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 19 Nov 2020 20:50:44 +0100 Subject: [PATCH 4/8] Fix multiple signedness warnings in gio/tests/gdbus-testserver.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/gdbus-testserver.c: In function ‘handle_method_call’: gio/tests/gdbus-testserver.c:334:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 334 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:343:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 343 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:352:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 352 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:361:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 361 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:370:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 370 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:379:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 379 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:388:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 388 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:397:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 397 | for (i = 0; i < n_elts; i++) | ^ gio/tests/gdbus-testserver.c:406:23: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘gsize’ {aka ‘long unsigned int’} 406 | for (i = 0; i < n_elts; i++) | ^ --- gio/tests/gdbus-testserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/gdbus-testserver.c b/gio/tests/gdbus-testserver.c index dd0d5ba5a..a0efccdc5 100644 --- a/gio/tests/gdbus-testserver.c +++ b/gio/tests/gdbus-testserver.c @@ -322,7 +322,7 @@ handle_method_call (GDBusConnection *connection, const guint64 *uint64s; const gdouble *doubles; gsize n_elts; - gint i, j; + gsize i, j; GVariantBuilder ret; g_variant_builder_init (&ret, G_VARIANT_TYPE ("(ayabanaqaiauaxatad)")); From 83a9ba77904b92cdd20c2557dee9b3f5c2c90869 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 19 Nov 2020 20:54:29 +0100 Subject: [PATCH 5/8] Fix missing initializer warning in gio/tests/gdbus-testserver.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/gdbus-testserver.c:806:1: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’} 806 | }; | ^ In file included from gio/gio.h:53, from gio/tests/gdbus-testserver.c:1: gdbusconnection.h:395:12: note: ‘padding’ declared here 395 | gpointer padding[8]; | ^~~~~~~ --- gio/tests/gdbus-testserver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gio/tests/gdbus-testserver.c b/gio/tests/gdbus-testserver.c index a0efccdc5..ae8e47b18 100644 --- a/gio/tests/gdbus-testserver.c +++ b/gio/tests/gdbus-testserver.c @@ -802,7 +802,8 @@ static const GDBusInterfaceVTable interface_vtable = { handle_method_call, handle_get_property, - handle_set_property + handle_set_property, + { 0 } }; static void From 4d52358fe262d555e8bb70dc2a83c0ff190c39bf Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Fri, 20 Nov 2020 19:24:47 +0100 Subject: [PATCH 6/8] Fix signedness warning in gio/tests/gsettings.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/gsettings.c: In function ‘strv_set_equal’: gio/tests/gsettings.c:2268:41: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘gint’ {aka ‘int’} 2268 | res = g_strv_length ((gchar**)strv) == count; | ^~ --- gio/tests/gsettings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c index 9e570a1b2..b809090e7 100644 --- a/gio/tests/gsettings.c +++ b/gio/tests/gsettings.c @@ -2397,7 +2397,7 @@ strv_has_string (gchar **haystack, static gboolean strv_set_equal (gchar **strv, ...) { - gint count; + gsize count; va_list list; const gchar *str; gboolean res; From 1c084ca71719e6553127de42926f4a0575f94e5f Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Fri, 20 Nov 2020 19:26:51 +0100 Subject: [PATCH 7/8] Fix missing initializer warning in gio/tests/gdbus-example-export.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/gdbus-example-export.c:229:1: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’} 229 | }; | ^ --- gio/tests/gdbus-example-export.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gio/tests/gdbus-example-export.c b/gio/tests/gdbus-example-export.c index f712d88f0..182305068 100644 --- a/gio/tests/gdbus-example-export.c +++ b/gio/tests/gdbus-example-export.c @@ -225,7 +225,8 @@ static const GDBusInterfaceVTable interface_vtable = { handle_method_call, handle_get_property, - handle_set_property + handle_set_property, + { 0 } }; static void From fd926b1ea7de7faeb0076eee720d550ae5622c49 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Fri, 20 Nov 2020 19:28:23 +0100 Subject: [PATCH 8/8] Fix missing initializer in gio/tests/gdbus-example-peer.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/tests/gdbus-example-peer.c:120:1: error: missing initializer for field ‘padding’ of ‘GDBusInterfaceVTable’ {aka ‘const struct _GDBusInterfaceVTable’} 120 | }; | ^ --- gio/tests/gdbus-example-peer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gio/tests/gdbus-example-peer.c b/gio/tests/gdbus-example-peer.c index 9d5de32a6..4fa1df9a5 100755 --- a/gio/tests/gdbus-example-peer.c +++ b/gio/tests/gdbus-example-peer.c @@ -117,6 +117,7 @@ static const GDBusInterfaceVTable interface_vtable = handle_method_call, NULL, NULL, + { 0 } }; /* ---------------------------------------------------------------------------------------------------- */