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.
2.6.5
Werner Lemberg 10 years ago
parent 54abd22891
commit a67c43e1c8
  1. 14
      ChangeLog
  2. 2
      include/internal/ftcalc.h

@ -1,3 +1,17 @@
2014-11-19 Behdad Esfahbod <behdad@behdad.org>
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 <wl@gnu.org>
[sfnt] Fix Savannah bug #43597.

@ -241,7 +241,7 @@ FT_BEGIN_HEADER
#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

Loading…
Cancel
Save