Fix up few signed vs unsigned warnings: exif_item_get_rational() last parameter is...
authorLaurent Monin <geeqie@norz.org>
Tue, 7 Oct 2008 19:29:13 +0000 (19:29 +0000)
committerLaurent Monin <geeqie@norz.org>
Tue, 7 Oct 2008 19:29:13 +0000 (19:29 +0000)
src/exif.c
src/exif.h
src/exiv2.cc

index 7ff8648..f54c996 100644 (file)
@@ -1478,10 +1478,10 @@ gint exif_item_get_integer(ExifItem *item, gint *value)
 }
 
 
-ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, gint n)
+ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, guint n)
 {
        if (!item) return NULL;
-       if (n >= (gint)item->elements) return NULL;
+       if (n >= item->elements) return NULL;
 
        if (item->format == EXIF_FORMAT_RATIONAL ||
            item->format == EXIF_FORMAT_RATIONAL_UNSIGNED)
index e6f50e0..6fc98c6 100644 (file)
@@ -133,7 +133,7 @@ guint exif_item_get_format_id(ExifItem *item);
 const gchar *exif_item_get_format_name(ExifItem *item, gint brief);
 gchar *exif_item_get_data_as_text(ExifItem *item);
 gint exif_item_get_integer(ExifItem *item, gint *value);
-ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, gint n);
+ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, guint n);
 
 gchar *exif_item_get_string(ExifItem *item, gint idx);
 
index efa43e4..145be41 100644 (file)
@@ -513,7 +513,7 @@ gint exif_item_get_integer(ExifItem *item, gint *value)
        }
 }
 
-ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, gint n)
+ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, guint n)
 {
        try {
                if (!item) return NULL;