[glib: 6/7] Fix signedness warning in glib/gdate.c




commit b9e66a59f67701ce76b3236f49006f3d64feff3d
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Thu Apr 8 13:29:05 2021 +0200

    Fix signedness warning in glib/gdate.c
    
    glib/gdate.c: In function ‘convert_twodigit_year’:
    glib/gdate.c:1217:13: warning: comparison of integer expressions of
      different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’}
     1217 |       if (y < two)
          |             ^

 glib/gdate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gdate.c b/glib/gdate.c
index c52193ff0..6b36ae718 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -1207,7 +1207,7 @@ g_date_prepare_to_parse (const gchar      *str,
 }
 
 static guint
-convert_twodigit_year (gint y)
+convert_twodigit_year (guint y)
 {
   if (using_twodigit_years && y < 100)
     {


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