From e89bd4cc15cc1a45abbee6542f0a45fd4be16465 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Tue, 17 Nov 2020 23:11:41 +0100 Subject: [PATCH] Fix several signedness warnings in gio/gapplication-tool.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gio/gapplication-tool.c: In function ‘app_help’: gio/gapplication-tool.c:90:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 90 | for (i = 0; i < G_N_ELEMENTS (topics); i++) | ^ gio/gapplication-tool.c:117:25: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 117 | for (i = 0; i < G_N_ELEMENTS (substvars); i++) | ^ gio/gapplication-tool.c:121:25: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 121 | for (i = 0; i < G_N_ELEMENTS (substvars); i++) | ^ gio/gapplication-tool.c:137:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 137 | for (i = 0; i < G_N_ELEMENTS (topics); i++) | ^ gio/gapplication-tool.c:140:21: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘long unsigned int’ 140 | for (i = 0; i < G_N_ELEMENTS (topics); i++) | ^ --- gio/gapplication-tool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gio/gapplication-tool.c b/gio/gapplication-tool.c index 68a742419..89b7e70b2 100644 --- a/gio/gapplication-tool.c +++ b/gio/gapplication-tool.c @@ -85,7 +85,7 @@ app_help (gboolean requested, if (command) { - gint i; + gsize i; for (i = 0; i < G_N_ELEMENTS (topics); i++) if (g_str_equal (topics[i].command, command)) @@ -103,7 +103,7 @@ app_help (gboolean requested, if (topic) { gint maxwidth; - gint i; + gsize i; g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication", topic->command, topic->synopsis ? _(topic->synopsis) : ""); @@ -128,7 +128,7 @@ app_help (gboolean requested, else { gint maxwidth; - gint i; + gsize i; g_string_append_printf (string, "\n %s %s %s\n\n", "gapplication", _("COMMAND"), _("[ARGS…]")); g_string_append_printf (string, _("Commands:\n"));