diff options
author | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2010-10-25 00:14:13 +0900 |
---|---|---|
committer | suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp> | 2010-10-25 00:14:13 +0900 |
commit | 46c371c2c7398d25fa614065c28a27ebb4b5d489 (patch) | |
tree | 57c10b4b2d06648e8397b70270d673a95de192c8 | |
parent | d1bf3e33f73e953724a02206bfd68dd4e23b2962 (diff) | |
download | freetype2-46c371c2c7398d25fa614065c28a27ebb4b5d489.tar.gz |
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.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/raster/ftraster.c | 8 | ||||
-rw-r--r-- | src/truetype/ttinterp.c | 3 |
3 files changed, 18 insertions, 6 deletions
@@ -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. 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; |