Commit 3ad8f355371d495fc0897a5217a48c1bf4c4a982

Daniel Zimmermann 2011-05-24T06:22:32

Reduce warnings for MS Visual Studio 2010. * src/autofit/afhints.c (af_glyph_hints_get_num_segments, af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide return value. * src/cff/cffgload.c (cff_slot_load): Add cast. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper loop variable type.

diff --git a/ChangeLog b/ChangeLog
index f6eed63..893febf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-05-24  Daniel Zimmermann  <netzimme@googlemail.com>
+
+	Reduce warnings for MS Visual Studio 2010.
+
+	* src/autofit/afhints.c (af_glyph_hints_get_num_segments,
+	af_glyph_hints_get_segment_offset) [!FT_DEBUG_AUTOFIT]: Provide
+	return value.
+	* src/cff/cffgload.c (cff_slot_load): Add cast.
+	* src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids): Use proper
+	loop variable type.
+
 2011-05-16  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	Automake component `builds/unix/install-sh' is removed.
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index be832ab..05e1569 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -420,6 +420,8 @@
     FT_UNUSED( hints );
     FT_UNUSED( dimension );
     FT_UNUSED( num_segments );
+
+    return 0;
   }
 
 
@@ -433,6 +435,8 @@
     FT_UNUSED( dimension );
     FT_UNUSED( idx );
     FT_UNUSED( offset );
+
+    return 0;
   }
 
 
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 78159ac..cb06bdf 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2706,7 +2706,7 @@
                                               glyph_index );
 
       if ( fd_index >= cff->num_subfonts ) 
-        fd_index = cff->num_subfonts - 1;
+        fd_index = (FT_Byte)( cff->num_subfonts - 1 );
 
       top_upm = cff->top_font.font_dict.units_per_em;
       sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 942361c..bcbd3b5 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -320,10 +320,11 @@
       }
     };
 
-    FT_ULong  checksum;
-    int       num_matched_ids[TRICK_SFNT_IDS_NUM_FACES];
-    FT_Bool   has_cvt, has_fpgm, has_prep;
-    int       i, j, k;
+    FT_ULong   checksum;
+    int        num_matched_ids[TRICK_SFNT_IDS_NUM_FACES];
+    FT_Bool    has_cvt, has_fpgm, has_prep;
+    FT_UShort  i;
+    int        j, k;
 
 
     FT_MEM_SET( num_matched_ids, 0,