From 3ad8f355371d495fc0897a5217a48c1bf4c4a982 Mon Sep 17 00:00:00 2001 From: Daniel Zimmermann Date: Tue, 24 May 2011 06:22:32 +0200 Subject: [PATCH] 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. --- ChangeLog | 11 +++++++++++ src/autofit/afhints.c | 4 ++++ src/cff/cffgload.c | 2 +- src/truetype/ttobjs.c | 9 +++++---- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6eed63d8..893febf51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-05-24 Daniel Zimmermann + + 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 Automake component `builds/unix/install-sh' is removed. diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c index be832abb5..05e1569d8 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 78159ac39..cb06bdf10 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 942361c50..bcbd3b56c 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,