[glom] GimpRuler: Fix some compiler warnings



commit 1f0f430d05fd16fabe9b2c82a0e5cbf831c779db
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 26 10:25:36 2013 +0200

    GimpRuler: Fix some compiler warnings

 glom/utility_widgets/gimpruler/gimpruler.c         |    2 +-
 .../gimpruler/libgimpbase/gimpunit.c               |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glom/utility_widgets/gimpruler/gimpruler.c b/glom/utility_widgets/gimpruler/gimpruler.c
index b21bc1d..bc2809a 100644
--- a/glom/utility_widgets/gimpruler/gimpruler.c
+++ b/glom/utility_widgets/gimpruler/gimpruler.c
@@ -1036,7 +1036,7 @@ gimp_ruler_draw_ticks (GimpRuler *ruler)
   g_snprintf (unit_str, sizeof (unit_str), "%d", scale);
   text_size = strlen (unit_str) * digit_height + 1;
 
-  for (scale = 0; scale < G_N_ELEMENTS (ruler_metric.ruler_scale); scale++)
+  for (scale = 0; scale < (gint)G_N_ELEMENTS (ruler_metric.ruler_scale); scale++)
     if (ruler_metric.ruler_scale[scale] * fabs (increment) > 2 * text_size)
       break;
 
diff --git a/glom/utility_widgets/gimpruler/libgimpbase/gimpunit.c 
b/glom/utility_widgets/gimpruler/libgimpbase/gimpunit.c
index d8311ac..62f52df 100644
--- a/glom/utility_widgets/gimpruler/libgimpbase/gimpunit.c
+++ b/glom/utility_widgets/gimpruler/libgimpbase/gimpunit.c
@@ -421,12 +421,12 @@ gimp_unit_format_string (const gchar *format,
                          GimpUnit     unit)
 {
   gchar buffer[1024];
-  gint  i = 0;
+  guint  i = 0;
 
   g_return_val_if_fail (format != NULL, NULL);
   g_return_val_if_fail (unit == GIMP_UNIT_PERCENT ||
                         (unit >= GIMP_UNIT_PIXEL &&
-                         unit < gimp_unit_get_number_of_units ()), NULL);
+                         unit < (guint)gimp_unit_get_number_of_units ()), NULL);
 
   while (i < (sizeof (buffer) - 1) && *format)
     {


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