Replace "%lx" for memory address by "%p", LLP64 platforms.

On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
the memory address (64-bit).  Also the casts from the pointer
type to long int should be removed to preserve the address
correctly.

* src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
(End_Profile) Ditto.
* src/truetype/ttinterp.c (Init_Context): Ditto.
This commit is contained in:
suzuki toshiya 2010-10-25 00:14:13 +09:00
parent d1bf3e33f7
commit 46c371c2c7
3 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,16 @@
2010-10-24 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Replace "%lx" for memory address by "%p", LLP64 platforms.
On LLP64 platforms (e.g. Win64), long (32-bit) cannot cover
the memory address (64-bit). Also the casts from the pointer
type to long int should be removed to preserve the address
correctly.
* src/raster/ftraster.c (New_Profile): Replace "%lx" by "%p".
(End_Profile) Ditto.
* src/truetype/ttinterp.c (Init_Context): Ditto.
2010-10-15 Alexei Podtelezhnikov <apodtele@gmail.com>
Fix thinko in spline flattening.

View File

@ -725,13 +725,13 @@
if ( overshoot )
ras.cProfile->flags |= Overshoot_Bottom;
FT_TRACE6(( "New ascending profile = %lx\n", (long)ras.cProfile ));
FT_TRACE6(( "New ascending profile = %p\n", ras.cProfile ));
break;
case Descending_State:
if ( overshoot )
ras.cProfile->flags |= Overshoot_Top;
FT_TRACE6(( "New descending profile = %lx\n", (long)ras.cProfile ));
FT_TRACE6(( "New descending profile = %p\n", ras.cProfile ));
break;
default:
@ -784,8 +784,8 @@
if ( h > 0 )
{
FT_TRACE6(( "Ending profile %lx, start = %ld, height = %ld\n",
(long)ras.cProfile, ras.cProfile->start, h ));
FT_TRACE6(( "Ending profile %p, start = %ld, height = %ld\n",
ras.cProfile, ras.cProfile->start, h ));
ras.cProfile->height = h;
if ( overshoot )

View File

@ -478,8 +478,7 @@
return TT_Err_Ok;
Fail_Memory:
FT_ERROR(( "Init_Context: not enough memory for 0x%08lx\n",
(FT_Long)exec ));
FT_ERROR(( "Init_Context: not enough memory for %p\n", exec ));
TT_Done_Context( exec );
return error;