mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-02 17:32:18 +01:00 
			
		
		
		
	Fix signedness warning in gio/giomodule.c
gio/giomodule.c: In function ‘print_help’:
glib/gmacros.h:806:26: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’}
  806 | #define MAX(a, b)  (((a) > (b)) ? (a) : (b))
      |                          ^
../glib.git/gio/giomodule.c:733:19: note: in expansion of macro ‘MAX’
  733 |           width = MAX (width, strlen (g_io_extension_get_name (extension)));
      |                   ^~~
			
			
This commit is contained in:
		@@ -731,7 +731,7 @@ print_help (const char        *envvar,
 | 
			
		||||
    {
 | 
			
		||||
      GList *l;
 | 
			
		||||
      GIOExtension *extension;
 | 
			
		||||
      int width = 0;
 | 
			
		||||
      gsize width = 0;
 | 
			
		||||
 | 
			
		||||
      for (l = g_io_extension_point_get_extensions (ep); l; l = l->next)
 | 
			
		||||
        {
 | 
			
		||||
@@ -743,7 +743,9 @@ print_help (const char        *envvar,
 | 
			
		||||
        {
 | 
			
		||||
          extension = l->data;
 | 
			
		||||
 | 
			
		||||
          g_print (" %*s - %d\n", width, g_io_extension_get_name (extension), g_io_extension_get_priority (extension));
 | 
			
		||||
          g_print (" %*s - %d\n", (int) MIN (width, G_MAXINT),
 | 
			
		||||
                   g_io_extension_get_name (extension),
 | 
			
		||||
                   g_io_extension_get_priority (extension));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user