[glib: 10/11] Fix signedness warning in gio/gdesktopappinfo.c:g_desktop_app_info_launch_uris_with_spawn()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 10/11] Fix signedness warning in gio/gdesktopappinfo.c:g_desktop_app_info_launch_uris_with_spawn()
- Date: Wed, 13 Jan 2021 11:50:55 +0000 (UTC)
commit 08f73f8187d68397f3707c69e402b27cf9a5c090
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Tue Nov 17 11:02:00 2020 +0100
Fix signedness warning in gio/gdesktopappinfo.c:g_desktop_app_info_launch_uris_with_spawn()
gio/gdesktopappinfo.c: In function ‘g_desktop_app_info_launch_uris_with_spawn’:
gio/gdesktopappinfo.c:2804:21: error: comparison of integer expressions of different signedness: ‘int’
and ‘long unsigned int’
2804 | for (i = 0; i < G_N_ELEMENTS (wrapper_argv); i++)
| ^
gio/gdesktopappinfo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index a2f0f439c..26e51415a 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2771,6 +2771,7 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
char *sn_id = NULL;
char **wrapped_argv;
int i;
+ gsize j;
const gchar * const wrapper_argv[] =
{
"/bin/sh",
@@ -2834,8 +2835,8 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
* resurrected). */
wrapped_argv = g_new (char *, argc + G_N_ELEMENTS (wrapper_argv) + 1);
- for (i = 0; i < G_N_ELEMENTS (wrapper_argv); i++)
- wrapped_argv[i] = g_strdup (wrapper_argv[i]);
+ for (j = 0; j < G_N_ELEMENTS (wrapper_argv); j++)
+ wrapped_argv[j] = g_strdup (wrapper_argv[j]);
for (i = 0; i < argc; i++)
wrapped_argv[i + G_N_ELEMENTS (wrapper_argv)] = g_steal_pointer (&argv[i]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]