diff --git a/[priyesh]ChangeLog b/[priyesh]ChangeLog index 29f1547a2..e46b5bead 100644 --- a/[priyesh]ChangeLog +++ b/[priyesh]ChangeLog @@ -1,8 +1,16 @@ 2020-08-12 Priyesh Kumar + * src/base/ftdebug.c (ft_log_handler): Fix "-Wunused-parameter" warning. + + * include/freetype/ftlogging.h ( FTLOGGING_H_ ): Added Include guard. + + * src/*: Fixed format specifiers. + + * [priyesh]ChangeLog: Fix typo. + Bug fix on Windows. - * include/freetype/internal/ftdebug.h: Store the name of current + * include/freetype/internal/ftdebug.h (FT_LOG): Store the name of current `FT_COMPONENT' and then pass it to the functions `ft_add_tag()' and `ft_remove_tag()' diff --git a/include/freetype/ftlogging.h b/include/freetype/ftlogging.h index 256a21d40..21ffb4926 100644 --- a/include/freetype/ftlogging.h +++ b/include/freetype/ftlogging.h @@ -1,5 +1,9 @@ #include FT_CONFIG_CONFIG_H +#ifndef FTLOGGING_H_ +#define FTLOGGING_H_ + + FT_BEGIN_HEADER /*************************************************************************** @@ -40,7 +44,9 @@ FT_BEGIN_HEADER FT_Set_Log_Handler( ft_custom_log_handler handler ); FT_EXPORT( void ) - FT_Set_Default_Log_Handler(); + FT_Set_Default_Log_Handler( void ); FT_END_HEADER + +#endif /* FTLOGGING_H_ */ diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c index 6f925b43c..67163228d 100644 --- a/src/base/ftdebug.c +++ b/src/base/ftdebug.c @@ -452,6 +452,7 @@ else ft_log_handler( const struct dlg_origin* origin, const char* string, void* data ) { + ( void ) data; static unsigned int features ; if( ft_timestamp_flag && ft_component_flag && ft_have_newline_char ) features = features_both; diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c index 3d2da1e03..3f60abce1 100644 --- a/src/psaux/cffdecode.c +++ b/src/psaux/cffdecode.c @@ -2153,7 +2153,7 @@ decoder->locals_bias ); - FT_TRACE4(( " callsubr (idx %d, entering level %d)\n", + FT_TRACE4(( " callsubr (idx %d, entering level %ld)\n", idx, zone - decoder->zones + 1 )); @@ -2197,7 +2197,7 @@ decoder->globals_bias ); - FT_TRACE4(( " callgsubr (idx %d, entering level %d)\n", + FT_TRACE4(( " callgsubr (idx %d, entering level %ld)\n", idx, zone - decoder->zones + 1 )); @@ -2236,7 +2236,7 @@ break; case cff_op_return: - FT_TRACE4(( " return (leaving level %d)\n", + FT_TRACE4(( " return (leaving level %ld)\n", decoder->zone - decoder->zones )); if ( decoder->zone <= decoder->zones ) diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index 2ed27ca19..f35f2440c 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -517,7 +517,7 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( bol ) { - FT_TRACE5(( " (%d)", decoder->top - decoder->stack )); + FT_TRACE5(( " (%ld)", decoder->top - decoder->stack )); bol = FALSE; } #endif @@ -1162,7 +1162,7 @@ if ( top - decoder->stack != num_args ) FT_TRACE0(( "t1_decoder_parse_charstrings:" " too much operands on the stack" - " (seen %d, expected %d)\n", + " (seen %ld, expected %d)\n", top - decoder->stack, num_args )); break; } @@ -1209,7 +1209,7 @@ FT_TRACE4(( "BuildCharArray = [ " )); for ( i = 0; i < decoder->len_buildchar; i++ ) - FT_TRACE4(( "%d ", decoder->buildchar[i] )); + FT_TRACE4(( "%ld ", decoder->buildchar[i] )); FT_TRACE4(( "]\n" )); } diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index 2c6fc0588..66eb80282 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -3781,7 +3781,7 @@ if ( opcode_pointer[i] == opcode_size[i] ) { - FT_TRACE6(( "sph: Function %d, opcode ptrn: %d, %s %s\n", + FT_TRACE6(( "sph: Function %d, opcode ptrn: %ld, %s %s\n", i, n, exc->face->root.family_name, exc->face->root.style_name ));