[babl] -Wsign-compare conversions.c



commit 26f3e9e34af214b7c3f6238e9b6405fa0c37d27c
Author: Axel Viala <axel viala darnuria eu>
Date:   Fri Mar 25 15:42:56 2022 +0100

    -Wsign-compare conversions.c

 babl/base/type-u32.c | 4 ++--
 tests/conversions.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/babl/base/type-u32.c b/babl/base/type-u32.c
index 288ff2ec6..7d07ff10e 100644
--- a/babl/base/type-u32.c
+++ b/babl/base/type-u32.c
@@ -69,7 +69,7 @@ convert_u32_double_scaled (BablConversion *c,
 {
   while (n--)
     {
-      int    u32val = *(uint32_t *) src;
+      uint32_t    u32val = *(uint32_t *) src;
       double dval;
 
       if (u32val < min)
@@ -154,7 +154,7 @@ convert_u32_float_scaled (BablConversion *c,
 {
   while (n--)
     {
-      int    u32val = *(uint32_t *) src;
+      uint32_t u32val = *(uint32_t *) src;
       float dval;
 
       if (u32val < min)
diff --git a/tests/conversions.c b/tests/conversions.c
index 9503d041d..3a68445a0 100644
--- a/tests/conversions.c
+++ b/tests/conversions.c
@@ -62,7 +62,7 @@ main (int    argc,
   putenv ("BABL_DEBUG_MISSING" "=" "1");
   babl_init ();
   
-  for (int i = 0; i < sizeof (fishes)/sizeof(fishes[0]);i ++)
+  for (size_t i = 0; i < sizeof (fishes)/sizeof(fishes[0]);i ++)
   {
     babl_fish (babl_format (fishes[i].from_format),
                babl_format (fishes[i].to_format));


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