Fix clang14 compiler warnings. * include/freetype/internal/ftstream.h (FT_GET_SHORT_LE, FT_GET_USHORT_LE): Fix type. * src/sfnt/ttcolr.c (get_deltas_for_var_index_base): Always return boolean value. (tt_face_get_colorline_stops): Fix type of `var_index_base`.
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
diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h
index a12e41a..1f2858e 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -314,8 +314,8 @@ FT_BEGIN_HEADER
#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetULong, FT_UInt32 )
#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetULong, FT_UInt32 )
-#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Int32 )
-#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UInt32 )
+#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_Int16 )
+#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetUShortLE, FT_UInt16 )
#define FT_GET_LONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_Int32 )
#define FT_GET_ULONG_LE() FT_GET_MACRO( FT_Stream_GetULongLE, FT_UInt32 )
#endif
diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
index af649dc..1c3dfc1 100644
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -557,8 +557,6 @@
FT_UInt num_deltas,
FT_ItemVarDelta* deltas )
{
- FT_Error error = FT_Err_Ok;
-
FT_UInt outer_index = 0;
FT_UInt inner_index = 0;
FT_ULong loop_var_index = var_index_base;
@@ -597,8 +595,7 @@
{
/* TODO: Direct lookup case not implemented or tested yet. */
FT_ASSERT( 0 );
- error = FT_THROW( Unimplemented_Feature );
- return error;
+ return 0;
}
deltas[i] = mm->get_item_delta( FT_FACE( face ), &colr->var_store,
@@ -1517,7 +1514,7 @@
Colr* colr = (Colr*)face->colr;
FT_Byte* p;
- FT_Long var_index_base;
+ FT_ULong var_index_base;
FT_Int item_deltas[2];