Commit d25ec16672f690dcbd04cdd303f7b5e62c8d959c

Werner Lemberg 2015-02-25T09:19:59

[otvalid] Signedness fixes. * src/otvalid/otvcommn.c, src/otvalid/otvgdef.c, src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c: Apply.

diff --git a/ChangeLog b/ChangeLog
index 120cf9a..84d3976 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2015-02-25  Werner Lemberg  <wl@gnu.org>
 
+	[otvalid] Signedness fixes.
+
+	* src/otvalid/otvcommn.c, src/otvalid/otvgdef.c,
+	src/otvalid/otvgpos.c, src/otvalid/otvgsub.c, src/otvalid/otvmath.c:
+	Apply.
+
+2015-02-25  Werner Lemberg  <wl@gnu.org>
+
 	* src/bzip2/ftbzip2.c (ft_bzip2_alloc): Signedness fix.
 
 2015-02-25  Werner Lemberg  <wl@gnu.org>
diff --git a/src/otvalid/otvcommn.c b/src/otvalid/otvcommn.c
index bf51460..103ffba 100644
--- a/src/otvalid/otvcommn.c
+++ b/src/otvalid/otvcommn.c
@@ -687,7 +687,7 @@
 
     OTV_TRACE(( " (Count = %d)\n", Count ));
 
-    otv_Coverage_validate( table + Coverage, otvalid, Count );
+    otv_Coverage_validate( table + Coverage, otvalid, (FT_Int)Count );
 
     OTV_LIMIT_CHECK( Count * 2 );
 
diff --git a/src/otvalid/otvgdef.c b/src/otvalid/otvgdef.c
index 8936ba8..8269d2f 100644
--- a/src/otvalid/otvgdef.c
+++ b/src/otvalid/otvgdef.c
@@ -61,7 +61,7 @@
 
     OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount ));
 
-    otv_Coverage_validate( Coverage, otvalid, GlyphCount );
+    otv_Coverage_validate( Coverage, otvalid, (FT_Int)GlyphCount );
     if ( GlyphCount != otv_Coverage_get_count( Coverage ) )
       FT_INVALID_DATA;
 
diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c
index 6c09b93..44c43c5 100644
--- a/src/otvalid/otvgpos.c
+++ b/src/otvalid/otvgpos.c
@@ -395,7 +395,9 @@
 
         len_value = otv_value_length( ValueFormat );
 
-        otv_Coverage_validate( table + Coverage, otvalid, ValueCount );
+        otv_Coverage_validate( table + Coverage,
+                               otvalid,
+                               (FT_Int)ValueCount );
 
         OTV_LIMIT_CHECK( ValueCount * len_value );
 
@@ -605,7 +607,9 @@
 
         OTV_TRACE(( " (EntryExitCount = %d)\n", EntryExitCount ));
 
-        otv_Coverage_validate( table + Coverage, otvalid, EntryExitCount );
+        otv_Coverage_validate( table + Coverage,
+                               otvalid,
+                               (FT_Int)EntryExitCount );
 
         OTV_LIMIT_CHECK( EntryExitCount * 4 );
 
diff --git a/src/otvalid/otvgsub.c b/src/otvalid/otvgsub.c
index 7049022..0f8b02c 100644
--- a/src/otvalid/otvgsub.c
+++ b/src/otvalid/otvgsub.c
@@ -70,11 +70,11 @@
 
         otv_Coverage_validate( Coverage, otvalid, -1 );
 
-        idx = otv_Coverage_get_first( Coverage ) + DeltaGlyphID;
+        idx = (FT_Long)otv_Coverage_get_first( Coverage ) + DeltaGlyphID;
         if ( idx < 0 )
           FT_INVALID_DATA;
 
-        idx = otv_Coverage_get_last( Coverage ) + DeltaGlyphID;
+        idx = (FT_Long)otv_Coverage_get_last( Coverage ) + DeltaGlyphID;
         if ( (FT_UInt)idx >= otvalid->glyph_count )
           FT_INVALID_DATA;
       }
@@ -91,7 +91,9 @@
 
         OTV_TRACE(( " (GlyphCount = %d)\n", GlyphCount ));
 
-        otv_Coverage_validate( table + Coverage, otvalid, GlyphCount );
+        otv_Coverage_validate( table + Coverage,
+                               otvalid,
+                               (FT_Int)GlyphCount );
 
         OTV_LIMIT_CHECK( GlyphCount * 2 );
 
diff --git a/src/otvalid/otvmath.c b/src/otvalid/otvmath.c
index b0d4fc0..db3d5f8 100644
--- a/src/otvalid/otvmath.c
+++ b/src/otvalid/otvmath.c
@@ -108,7 +108,7 @@
     table_size = 4 + 4 * cnt;
 
     OTV_SIZE_CHECK( Coverage );
-    otv_Coverage_validate( table + Coverage, otvalid, cnt );
+    otv_Coverage_validate( table + Coverage, otvalid, (FT_Int)cnt );
 
     for ( i = 0; i < cnt; ++i )
     {
@@ -196,7 +196,7 @@
     table_size = 4 + 8 * cnt;
 
     OTV_SIZE_CHECK( Coverage );
-    otv_Coverage_validate( table + Coverage, otvalid, cnt );
+    otv_Coverage_validate( table + Coverage, otvalid, (FT_Int)cnt );
 
     for ( i = 0; i < cnt; ++i )
     {
@@ -378,11 +378,11 @@
 
     OTV_SIZE_CHECK( VCoverage );
     if ( VCoverage )
-      otv_Coverage_validate( table + VCoverage, otvalid, vcnt );
+      otv_Coverage_validate( table + VCoverage, otvalid, (FT_Int)vcnt );
 
     OTV_SIZE_CHECK( HCoverage );
     if ( HCoverage )
-      otv_Coverage_validate( table + HCoverage, otvalid, hcnt );
+      otv_Coverage_validate( table + HCoverage, otvalid, (FT_Int)hcnt );
 
     for ( i = 0; i < vcnt; ++i )
     {