[glib: 2/11] Fix signedness warnings in gio/gdesktopappinfo.c:g_desktop_app_info_get_desktop_ids_for_content_type




commit daa0e0b76b9b50005fc5fda628bee1cc98a3d1c5
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Tue Nov 17 11:05:28 2020 +0100

    Fix signedness warnings in gio/gdesktopappinfo.c:g_desktop_app_info_get_desktop_ids_for_content_type()
    
    gio/gdesktopappinfo.c: In function ‘g_desktop_app_info_get_desktop_ids_for_content_type’:
    gio/gdesktopappinfo.c:4154:19: error: comparison of integer expressions of different signedness: ‘gint’ 
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
     4154 |     for (j = 0; j < desktop_file_dirs->len; j++)
          |                   ^
    gio/gdesktopappinfo.c:4158:17: error: comparison of integer expressions of different signedness: ‘gint’ 
{aka ‘int’} and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]
     4158 |   for (i = 0; i < hits->len; i++)
          |                 ^

 gio/gdesktopappinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index a0e8cb13d..ae19e6d74 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -4174,7 +4174,7 @@ g_desktop_app_info_get_desktop_ids_for_content_type (const gchar *content_type,
 {
   GPtrArray *hits, *blocklist;
   gchar **types;
-  gint i, j;
+  guint i, j;
 
   hits = g_ptr_array_new ();
   blocklist = g_ptr_array_new ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]