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`.
pull/3/head
Werner Lemberg 2 years ago
parent 284956b5b1
commit 38dc768a42
  1. 4
      include/freetype/internal/ftstream.h
  2. 7
      src/sfnt/ttcolr.c

@ -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

@ -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];

Loading…
Cancel
Save