diff --git a/ChangeLog b/ChangeLog index 439994d14..5b32dbab3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2014-06-13 Werner Lemberg + + Fix more compiler warnings. + Reported by Wojciech Mamrak . + + * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): + Make integer constant unsigned. + + * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) + : Fix types. + (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper + casts. + 2014-06-13 Werner Lemberg Fix compiler warnings. diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index 8316b9b38..a54c20c02 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -138,7 +138,7 @@ FT_Byte* gstyles = globals->glyph_styles; FT_UInt ss; FT_UInt i; - FT_UInt dflt = ~0; /* a non-valid value */ + FT_UInt dflt = ~0U; /* a non-valid value */ /* the value AF_STYLE_UNASSIGNED means `uncovered glyph' */ diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c index 8ff7b9d6a..cf886c893 100644 --- a/src/sfnt/ttsbit.c +++ b/src/sfnt/ttsbit.c @@ -256,7 +256,8 @@ case TT_SBIT_TABLE_TYPE_SBIX: { FT_Stream stream = face->root.stream; - FT_UInt offset, ppem, resolution, upem; + FT_UInt offset, upem; + FT_UShort ppem, resolution; TT_HoriHeader *hori; FT_ULong table_size; @@ -800,12 +801,12 @@ FT_Error error = FT_Err_Ok; FT_UInt num_components, nn; - FT_Char horiBearingX = decoder->metrics->horiBearingX; - FT_Char horiBearingY = decoder->metrics->horiBearingY; - FT_Byte horiAdvance = decoder->metrics->horiAdvance; - FT_Char vertBearingX = decoder->metrics->vertBearingX; - FT_Char vertBearingY = decoder->metrics->vertBearingY; - FT_Byte vertAdvance = decoder->metrics->vertAdvance; + FT_Char horiBearingX = (FT_Char)decoder->metrics->horiBearingX; + FT_Char horiBearingY = (FT_Char)decoder->metrics->horiBearingY; + FT_Byte horiAdvance = (FT_Byte)decoder->metrics->horiAdvance; + FT_Char vertBearingX = (FT_Char)decoder->metrics->vertBearingX; + FT_Char vertBearingY = (FT_Char)decoder->metrics->vertBearingY; + FT_Byte vertAdvance = (FT_Byte)decoder->metrics->vertAdvance; if ( p + 2 > limit ) @@ -1353,9 +1354,10 @@ tt_face_get_metrics( face, FALSE, glyph_index, &abearing, &aadvance ); metrics->horiBearingX = originOffsetX; - metrics->horiBearingY = -originOffsetY + metrics->height; - metrics->horiAdvance = aadvance * face->root.size->metrics.x_ppem / - face->header.Units_Per_EM; + metrics->horiBearingY = (FT_Short)( -originOffsetY + metrics->height ); + metrics->horiAdvance = (FT_Short)( aadvance * + face->root.size->metrics.x_ppem / + face->header.Units_Per_EM ); } return error;