* src/*: Fix -Wformat warnings.

This commit is contained in:
Priyesh Kumar 2020-08-28 09:56:38 +05:30 committed by Werner Lemberg
parent 2a5d8e8ff8
commit 6d9e6b21e5
7 changed files with 17 additions and 13 deletions

View File

@ -1,3 +1,7 @@
2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
* src/*: Fix `-Wformat` warnings.
2020-11-30 Priyesh Kumar <priyeshkkumar@gmail.com>
[builds/windows] Changes to build 'dlg' with FreeType on Windows.

View File

@ -1956,7 +1956,7 @@
{
FT_TRACE3(( " Write POST fragment #%d header (4-byte) to buffer"
" %p + 0x%08lx\n",
i, pfb_data, pfb_lenpos ));
i, (void*)pfb_data, pfb_lenpos ));
if ( pfb_lenpos + 3 > pfb_len + 2 )
goto Exit2;
@ -1971,7 +1971,7 @@
FT_TRACE3(( " Write POST fragment #%d header (6-byte) to buffer"
" %p + 0x%08lx\n",
i, pfb_data, pfb_pos ));
i, (void*)pfb_data, pfb_pos ));
if ( pfb_pos + 6 > pfb_len + 2 )
goto Exit2;
@ -1994,7 +1994,7 @@
FT_TRACE3(( " Load POST fragment #%d (%ld byte) to buffer"
" %p + 0x%08lx\n",
i, rlen, pfb_data, pfb_pos ));
i, rlen, (void*)pfb_data, pfb_pos ));
error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );
if ( error )

View File

@ -275,7 +275,7 @@
stream->close = ft_ansi_stream_close;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
FT_TRACE1(( " opened `%s' (%ld bytes) successfully\n",
filepathname, stream->size ));
return FT_Err_Ok;

View File

@ -185,11 +185,11 @@
"Added `FONT_ASCENT %hd'.\n"
#define ACMSG2 "FONT_DESCENT property missing. " \
"Added `FONT_DESCENT %hd'.\n"
#define ACMSG3 "Font width != actual width. Old: %hd New: %hd.\n"
#define ACMSG3 "Font width != actual width. Old: %d New: %d.\n"
#define ACMSG4 "Font left bearing != actual left bearing. " \
"Old: %hd New: %hd.\n"
#define ACMSG5 "Font ascent != actual ascent. Old: %hd New: %hd.\n"
#define ACMSG6 "Font descent != actual descent. Old: %hd New: %hd.\n"
#define ACMSG6 "Font descent != actual descent. Old: %d New: %d.\n"
#define ACMSG7 "Font height != actual height. Old: %hd New: %hd.\n"
#define ACMSG8 "Glyph scalable width (SWIDTH) adjustments made.\n"
#define ACMSG9 "SWIDTH field missing at line %ld. Set automatically.\n"

View File

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

View File

@ -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" ));
}

View File

@ -3771,7 +3771,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 ));