diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index 08cca5cda..26e51415a 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -1142,7 +1142,7 @@ desktop_file_dir_unindexed_setup_search (DesktopFileDir *dir) { /* Index the interesting keys... */ gchar **implements; - gint i; + gsize i; for (i = 0; i < G_N_ELEMENTS (desktop_key_match_category); i++) { @@ -1221,7 +1221,7 @@ static gboolean array_contains (GPtrArray *array, const gchar *str) { - gint i; + guint i; for (i = 0; i < array->len; i++) if (g_str_equal (array->pdata[i], str)) @@ -1545,7 +1545,7 @@ desktop_file_dir_get_implementations (DesktopFileDir *dir, static void desktop_file_dirs_lock (void) { - gint i; + guint i; const gchar *user_config_dir = g_get_user_config_dir (); g_mutex_lock (&desktop_file_dir_lock); @@ -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]); diff --git a/gio/glocalfilemonitor.c b/gio/glocalfilemonitor.c index 4f1660d16..eccab231c 100644 --- a/gio/glocalfilemonitor.c +++ b/gio/glocalfilemonitor.c @@ -649,7 +649,8 @@ g_file_monitor_source_new (gpointer instance, static GSourceFuncs source_funcs = { NULL, NULL, g_file_monitor_source_dispatch, - g_file_monitor_source_finalize + g_file_monitor_source_finalize, + NULL, NULL }; GFileMonitorSource *fms; GSource *source; diff --git a/gio/gmemoryinputstream.c b/gio/gmemoryinputstream.c index 37846b6ac..a9e855cef 100644 --- a/gio/gmemoryinputstream.c +++ b/gio/gmemoryinputstream.c @@ -476,7 +476,7 @@ g_memory_input_stream_seek (GSeekable *seekable, return FALSE; } - if (absolute < 0 || absolute > priv->len) + if (absolute < 0 || (gsize) absolute > priv->len) { g_set_error_literal (error, G_IO_ERROR, diff --git a/gio/gsocketcontrolmessage.c b/gio/gsocketcontrolmessage.c index 7acf6b358..255610c46 100644 --- a/gio/gsocketcontrolmessage.c +++ b/gio/gsocketcontrolmessage.c @@ -175,7 +175,7 @@ g_socket_control_message_deserialize (int level, GSocketControlMessage *message; GType *message_types; guint n_message_types; - int i; + guint i; /* Ensure we know about the built in types */ #ifndef G_OS_WIN32 diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c index 4bf1f6b88..665d729ed 100644 --- a/gio/gsubprocess.c +++ b/gio/gsubprocess.c @@ -256,7 +256,7 @@ static void child_setup (gpointer user_data) { ChildData *child_data = user_data; - gint i; + guint i; gint result; int errsv; @@ -268,7 +268,7 @@ child_setup (gpointer user_data) * have been created O_CLOEXEC. */ for (i = 0; i < 3; i++) - if (child_data->fds[i] != -1 && child_data->fds[i] != i) + if (child_data->fds[i] != -1 && child_data->fds[i] != (gint) i) { do { @@ -451,7 +451,7 @@ initable_init (GInitable *initable, { GSubprocess *self = G_SUBPROCESS (initable); #ifdef G_OS_UNIX - ChildData child_data = { { -1, -1, -1 }, 0 }; + ChildData child_data = { { -1, -1, -1 }, 0, NULL, NULL, NULL }; #endif gint *pipe_ptrs[3] = { NULL, NULL, NULL }; gint pipe_fds[3] = { -1, -1, -1 }; @@ -584,7 +584,7 @@ initable_init (GInitable *initable, #endif s = g_snprintf (self->identifier, sizeof self->identifier, "%"G_GUINT64_FORMAT, identifier); - g_assert (0 < s && s < sizeof self->identifier); + g_assert (0 < s && (gsize) s < sizeof self->identifier); } /* Start attempting to reap the child immediately */