ref: a67c43e1c819ad1499af6052ddf2f85b6b25e069
parent: 54abd22891bd51ef8b533b24df53b3019b5cee81
author: Werner Lemberg <[email protected]>
date: Wed Nov 19 01:46:23 EST 2014
Avoid compiler warnings on x86-64 for `FT_MulFix'. `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h', but several inline implementations of it in `ftcalc.h' take `FT_Int32' arguments. This is causing compiler warnings on x86-64: If parameters of type `FT_Fixed' (= `FT_Long') are passed to the inline implementation of this function, integer values are truncated from 64bit to 32bit. * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add casts.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2014-11-19 Behdad Esfahbod <[email protected]>
+
+ Avoid compiler warnings on x86-64 for `FT_MulFix'.
+
+ `FT_MulFix' takes `FT_Long' parameters as defined in `freetype.h',
+ but several inline implementations of it in `ftcalc.h' take
+ `FT_Int32' arguments. This is causing compiler warnings on x86-64:
+ If parameters of type `FT_Fixed' (= `FT_Long') are passed to the
+ inline implementation of this function, integer values are truncated
+ from 64bit to 32bit.
+
+ * include/internal/ftcalc.h (FT_MulFix) [FT_MULFIX_ASSEMBLER]: Add
+ casts.
+
2014-11-15 Werner Lemberg <[email protected]>
[sfnt] Fix Savannah bug #43597.
--- a/include/internal/ftcalc.h
+++ b/include/internal/ftcalc.h
@@ -241,7 +241,7 @@
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
#ifdef FT_MULFIX_ASSEMBLER
-#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( a, b )
+#define FT_MulFix( a, b ) FT_MULFIX_ASSEMBLER( (FT_Int32)(a), (FT_Int32)(b) )
#endif
#endif