Fix more compiler warnings. Reported by Wojciech Mamrak <wmamrak@gmail.com>. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Make integer constant unsigned. * src/sfnt/ttsbit.c (tt_face_load_strike_metrics) <TT_SBIT_TABLE_TYPE_SBIX>: Fix types. (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper casts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
diff --git a/ChangeLog b/ChangeLog
index 439994d..5b32dba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2014-06-13 Werner Lemberg <wl@gnu.org>
+ Fix more compiler warnings.
+ Reported by Wojciech Mamrak <wmamrak@gmail.com>.
+
+ * src/autofit/afglobal.c (af_face_globals_compute_style_coverage):
+ Make integer constant unsigned.
+
+ * src/sfnt/ttsbit.c (tt_face_load_strike_metrics)
+ <TT_SBIT_TABLE_TYPE_SBIX>: Fix types.
+ (tt_sbit_decoder_load_compound, tt_face_load_sbix_image): Add proper
+ casts.
+
+2014-06-13 Werner Lemberg <wl@gnu.org>
+
Fix compiler warnings.
Reported by Wojciech Mamrak <wmamrak@gmail.com>.
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 8316b9b..a54c20c 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 8ff7b9d..cf886c8 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;