[glib: 4/8] Fix signedness warnings in gio/gapplication-tool.c




commit ebb3427f22d3e8fe94e03899a5bc9f172df8004f
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Tue Nov 17 23:28:44 2020 +0100

    Fix signedness warnings in gio/gapplication-tool.c
    
    gio/gapplication-tool.c: In function ‘app_help’:
    glib/gmacros.h:806:26: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘size_t’ {aka ‘long unsigned int’}
    gio/gapplication-tool.c:121:26: note: in expansion of macro ‘MAX’
      121 |               maxwidth = MAX(maxwidth, strlen (_(substvars[i].var)));
          |                          ^~~
    gio/gapplication-tool.c: In function ‘app_help’:
    glib/gmacros.h:806:26: error: comparison of integer expressions of different signedness: ‘gint’ {aka 
‘int’} and ‘size_t’ {aka ‘long unsigned int’}
    gio/gapplication-tool.c:140:20: note: in expansion of macro ‘MAX’
      140 |         maxwidth = MAX(maxwidth, strlen (topics[i].command));
          |                    ^~~

 gio/gapplication-tool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gapplication-tool.c b/gio/gapplication-tool.c
index e34f50f69..7ad062299 100644
--- a/gio/gapplication-tool.c
+++ b/gio/gapplication-tool.c
@@ -104,7 +104,7 @@ app_help (gboolean     requested,
 
   if (topic)
     {
-      gint maxwidth;
+      guint maxwidth;
       gsize i;
 
       g_string_append_printf (string, "\n  %s %s %s\n\n", "gapplication",
@@ -129,7 +129,7 @@ app_help (gboolean     requested,
     }
   else
     {
-      gint maxwidth;
+      guint maxwidth;
       gsize i;
 
       g_string_append_printf (string, "\n  %s %s %s\n\n", "gapplication", _("COMMAND"), _("[ARGS…]"));


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