ref: 799d27b0b68008d427df1a55e761e3f5b42bd3f6
parent: 1897186fb718bdda9f953c09906cb5bf36594905
author: Werner Lemberg <[email protected]>
date: Sat Aug 4 02:39:11 EDT 2018
Fix clang warnings. * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of `orientation'. * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature. * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables. Add cast. * src/type1/t1load.c (parse_weight_vector): Fix cast.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2018-08-04 Werner Lemberg <[email protected]>
+
+ Fix clang warnings.
+
+ * src/base/ftoutln.c (FT_Outline_EmboldenXY): Fix type of
+ `orientation'.
+
+ * src/gxvalid/gxvcommn.c (gx_lookup_value_read): Fix signature.
+
+ * src/pcf/pcfread.c (pcf_get_encodings): Fix type of some variables.
+ Add cast.
+
+ * src/type1/t1load.c (parse_weight_vector): Fix cast.
+
2018-07-31 Werner Lemberg <[email protected]>
* src/cid/cidtoken.h: Handle `XUID' keyword.
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -911,9 +911,9 @@
FT_Pos xstrength,
FT_Pos ystrength )
{
- FT_Vector* points;
- FT_Int c, first, last;
- FT_Int orientation;
+ FT_Vector* points;
+ FT_Int c, first, last;
+ FT_Orientation orientation;
if ( !outline )
--- a/src/gxvalid/gxvcommn.c
+++ b/src/gxvalid/gxvcommn.c
@@ -384,8 +384,8 @@
( P += 2, gxv_lookup_value_load( P - 2, SIGNSPEC ) )
static GXV_LookupValueDesc
- gxv_lookup_value_load( FT_Bytes p,
- int signspec )
+ gxv_lookup_value_load( FT_Bytes p,
+ GXV_LookupValue_SignSpec signspec )
{
GXV_LookupValueDesc v;
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -944,12 +944,12 @@
FT_Error error;
FT_Memory memory = FT_FACE( face )->memory;
FT_ULong format, size;
- int firstCol, lastCol;
- int firstRow, lastRow;
+ FT_Short firstCol, lastCol;
+ FT_Short firstRow, lastRow;
FT_ULong nencoding;
FT_UShort defaultCharRow, defaultCharCol;
FT_UShort encodingOffset, defaultCharEncodingOffset;
- int i, j;
+ FT_Short i, j;
FT_Byte* pos;
FT_ULong k;
PCF_Encoding encoding = NULL;
@@ -1037,7 +1037,7 @@
defaultCharCol < (FT_UShort)firstCol ||
defaultCharCol > (FT_UShort)lastCol )
{
- face->defaultChar = firstRow * 256 + firstCol;
+ face->defaultChar = (FT_UShort)firstRow * 256U + (FT_UShort)firstCol;
FT_TRACE0(( "pcf_get_encodings:"
" Invalid default character set to %d\n",
face->defaultChar ));
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1043,7 +1043,7 @@
blend->default_weight_vector[n] =
blend->weight_vector[n] = T1_ToFixed( parser, 0 );
- FT_TRACE4(( " %f", (float)blend->weight_vector[n] / 65536 ));
+ FT_TRACE4(( " %f", (double)blend->weight_vector[n] / 65536 ));
}
FT_TRACE4(( "]\n" ));