[glib: 5/11] Fix signedness warning in gio/gdesktopappinfo.c:g_desktop_app_info_search()
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 5/11] Fix signedness warning in gio/gdesktopappinfo.c:g_desktop_app_info_search()
- Date: Tue, 19 Jan 2021 10:24:23 +0000 (UTC)
commit 9567665524843350e6b783f8692f311bf00df305
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Tue Nov 17 11:11:45 2020 +0100
Fix signedness warning in gio/gdesktopappinfo.c:g_desktop_app_info_search()
gio/gdesktopappinfo.c: In function ‘g_desktop_app_info_search’:
gio/gdesktopappinfo.c:4517:17: error: comparison of integer expressions of different signedness: ‘gint’
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
4517 | for (i = 0; i < desktop_file_dirs->len; i++)
| ^
gio/gdesktopappinfo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 3cc453ccd..74fadaf97 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -4540,6 +4540,7 @@ g_desktop_app_info_search (const gchar *search_string)
gint n_categories = 0;
gint start_of_category;
gint i, j;
+ guint k;
search_tokens = g_str_tokenize_and_fold (search_string, NULL, NULL);
@@ -4547,11 +4548,11 @@ g_desktop_app_info_search (const gchar *search_string)
reset_total_search_results ();
- for (i = 0; i < desktop_file_dirs->len; i++)
+ for (k = 0; k < desktop_file_dirs->len; k++)
{
for (j = 0; search_tokens[j]; j++)
{
- desktop_file_dir_search (g_ptr_array_index (desktop_file_dirs, i), search_tokens[j]);
+ desktop_file_dir_search (g_ptr_array_index (desktop_file_dirs, k), search_tokens[j]);
merge_token_results (j == 0);
}
merge_directory_results ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]