From da9eb9c719bb128cb2e13c7cc9a7ded4abce448d Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 7 Feb 2023 07:01:36 +0100 Subject: [PATCH] Fix minor clang and clang++ warnings. --- src/sdf/ftbsdf.c | 8 ++++---- src/sdf/ftsdf.c | 2 +- src/sfnt/pngshim.c | 2 +- src/truetype/ttgxvar.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c index 85bd5148a..901d8b740 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 28decc803..5faa74351 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 aca11f321..2aeba3592 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 55861c587..0478c3288 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;