From 9ba196935af82436898d32be65d91e02cbd42a1e Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Fri, 3 Jul 2009 18:01:31 +0900 Subject: [PATCH] cache: Insert explict casts for LP64 systems. --- ChangeLog | 10 ++++++++++ src/cache/ftcbasic.c | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 202183dbd..bfc4bc2f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-07-03 suzuki toshiya + + cache: Insert explict casts for LP64 systems. + + * src/cache/ftcbasic.c (FTC_ImageCache_Lookup, + FTC_SBitCache_Lookup): The type of FTC_ImageType->width + is FT_Int, so the cast to unsigned larger type FT_ULong + is introduced for the comparisons with 0x10000L for + LP64 platform. + 2009-07-03 suzuki toshiya cache: Fix some data types mismatching with their sources. diff --git a/src/cache/ftcbasic.c b/src/cache/ftcbasic.c index 9f822e49f..7539f55e1 100644 --- a/src/cache/ftcbasic.c +++ b/src/cache/ftcbasic.c @@ -334,7 +334,7 @@ * This one is a major hack used to detect whether we are passed a * regular FTC_ImageType handle, or a legacy FTC_OldImageDesc one. */ - if ( type->width >= 0x10000 ) + if ( (FT_ULong)type->width >= 0x10000L ) { FTC_OldImageDesc desc = (FTC_OldImageDesc)type; @@ -656,7 +656,7 @@ /* This one is a major hack used to detect whether we are passed a * regular FTC_ImageType handle, or a legacy FTC_OldImageDesc one. */ - if ( type->width >= 0x10000 ) + if ( (FT_ULong)type->width >= 0x10000L ) { FTC_OldImageDesc desc = (FTC_OldImageDesc)type;