Fix minor clang and clang++ warnings.
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
diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c
index 85bd514..901d8b7 100644
--- a/src/sdf/ftbsdf.c
+++ b/src/sdf/ftbsdf.c
@@ -1116,13 +1116,13 @@
goto Exit;
}
- spread = FT_INT_16D16( worker->params.spread );
+ spread = (FT_16D16)FT_INT_16D16( worker->params.spread );
#if USE_SQUARED_DISTANCES
- sp_sq = FT_INT_16D16( worker->params.spread *
- worker->params.spread );
+ sp_sq = (FT_16D16)FT_INT_16D16( worker->params.spread *
+ worker->params.spread );
#else
- sp_sq = FT_INT_16D16( worker->params.spread );
+ sp_sq = (FT_16D16)FT_INT_16D16( worker->params.spread );
#endif
for ( j = 0; j < r; j++ )
diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index 28decc8..5faa743 100644
--- a/src/sdf/ftsdf.c
+++ b/src/sdf/ftsdf.c
@@ -3258,7 +3258,7 @@
/* and also determine the signs properly. */
SDF_Signed_Distance* dists = NULL;
- const FT_16D16 fixed_spread = FT_INT_16D16( spread );
+ const FT_16D16 fixed_spread = (FT_16D16)FT_INT_16D16( spread );
if ( !shape || !bitmap )
diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
index aca11f3..2aeba35 100644
--- a/src/sfnt/pngshim.c
+++ b/src/sfnt/pngshim.c
@@ -239,7 +239,7 @@
*e = FT_THROW( Invalid_Stream_Read );
png_error( png, NULL );
- return;
+ /* return; (never reached) */
}
ft_memcpy( data, stream->cursor, length );
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 55861c5..0478c32 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -1005,7 +1005,7 @@
FT_ItemVarDelta* deltaSet;
FT_UInt master, j;
- FT_Fixed* scalars;
+ FT_Fixed* scalars = NULL;
FT_ItemVarDelta returnValue;
@@ -1983,7 +1983,7 @@
FT_Var_Axis* a;
GX_AVarSegment av;
- FT_Fixed* new_normalized;
+ FT_Fixed* new_normalized = NULL;
FT_Fixed* old_normalized;