sr/*.c: Various minor fixes.
* src/autofit/ft-hb.c (_hb_ft_reference_table): Call `FT_UNUSED` after variable declarations. * src/gxvalid/gxvjust.c (gxv_just_widthDeltaClusters_validate): Eliminate unused variable. * src/gzip/ftgzip.c: Don't call GCC '-Wstrict-prototypes' pragma for C++ compiler. * src/sfnt/ttcolr.c (ENSURE_READ_BYTES): Remove final semicolon to avoid compiler warning. * src/sfnt/ttsvg.c (tt_face_load_svg_doc): Fix signedness warning.
This commit is contained in:
parent
2692b3215b
commit
6a179ff7d5
@ -38,12 +38,13 @@
|
||||
static hb_blob_t *
|
||||
_hb_ft_reference_table (hb_face_t *face, hb_tag_t tag, void *user_data)
|
||||
{
|
||||
FT_UNUSED (face);
|
||||
FT_Face ft_face = (FT_Face) user_data;
|
||||
FT_Byte *buffer;
|
||||
FT_ULong length = 0;
|
||||
FT_Error error;
|
||||
|
||||
FT_UNUSED (face);
|
||||
|
||||
/* Note: FreeType like HarfBuzz uses the NONE tag for fetching the entire blob */
|
||||
|
||||
error = FT_Load_Sfnt_Table (ft_face, tag, 0, NULL, &length);
|
||||
|
@ -156,7 +156,6 @@
|
||||
{
|
||||
FT_Bytes p = table;
|
||||
FT_Bytes wdc_end = table + GXV_JUST_DATA( wdc_offset_max );
|
||||
FT_UInt i;
|
||||
|
||||
|
||||
GXV_NAME_ENTER( "just justDeltaClusters" );
|
||||
@ -164,7 +163,7 @@
|
||||
if ( limit <= wdc_end )
|
||||
FT_INVALID_OFFSET;
|
||||
|
||||
for ( i = 0; p <= wdc_end; i++ )
|
||||
while ( p <= wdc_end )
|
||||
{
|
||||
gxv_just_wdc_entry_validate( p, limit, gxvalid );
|
||||
p += gxvalid->subtable_length;
|
||||
|
@ -90,7 +90,9 @@
|
||||
|
||||
#if defined( __GNUC__ )
|
||||
#pragma GCC diagnostic push
|
||||
#ifndef __cplusplus
|
||||
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
|
||||
#endif
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
#pragma GCC diagnostic ignored "-Wredundant-decls"
|
||||
#endif
|
||||
|
@ -61,7 +61,7 @@
|
||||
#define ENSURE_READ_BYTES( byte_size ) \
|
||||
if ( p < colr->paints_start_v1 || \
|
||||
p > (FT_Byte*)colr->table + colr->table_size - byte_size ) \
|
||||
return 0;
|
||||
return 0
|
||||
|
||||
|
||||
typedef enum FT_PaintFormat_Internal_
|
||||
|
@ -310,7 +310,8 @@
|
||||
if ( error != FT_Err_Ok )
|
||||
goto Exit;
|
||||
|
||||
doc_limit = svg->table_size - ( doc_list - (FT_Byte*)svg->table );
|
||||
doc_limit = svg->table_size -
|
||||
(FT_ULong)( doc_list - (FT_Byte*)svg->table );
|
||||
if ( doc_offset > doc_limit ||
|
||||
doc_length > doc_limit - doc_offset )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user