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.
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 84 85 86 87 88 89 90 91 92 93 94 95 96
diff --git a/ChangeLog b/ChangeLog
index a031a65..48b7944 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2018-08-04 Werner Lemberg <wl@gnu.org>
+
+ 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 <wl@gnu.org>
* src/cid/cidtoken.h: Handle `XUID' keyword.
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 99edb0e..09a6a1f 100644
--- 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 )
diff --git a/src/gxvalid/gxvcommn.c b/src/gxvalid/gxvcommn.c
index 9a22107..4d8a4a2 100644
--- 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;
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 69a4b15..9893644 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -944,12 +944,12 @@ THE SOFTWARE.
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 @@ THE SOFTWARE.
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 ));
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 627d8d2..a443571 100644
--- 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" ));