From 46c371c2c7398d25fa614065c28a27ebb4b5d489 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Mon, 25 Oct 2010 00:14:13 +0900 Subject: 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. --- ChangeLog | 13 +++++++++++++ src/raster/ftraster.c | 8 ++++---- src/truetype/ttinterp.c | 3 +-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05f43c020..c243a0e1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2010-10-24 suzuki toshiya + + 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 Fix thinko in spline flattening. diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 8feba2bfb..4050cdc36 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -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 ) diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index e196dcea0..34cd25879 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -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; -- cgit v1.2.1