ref: 1b3a0014e2ebad50efb6a0c1d7948a3c7ffc21a2
parent: 79860707146ac0d9ae0a9656d85fb9bfd4540b1e
author: Werner Lemberg <[email protected]>
date: Mon Jun 11 09:26:11 EDT 2001
* src/base/ftcalc.c (FT_MulDiv, FT_DivFix, FT_Sqrt64): Remove compiler warnings.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-11 Mike Owens <[email protected]>
+
+ * src/base/ftcalc.c (FT_MulDiv, FT_DivFix, FT_Sqrt64): Remove
+ compiler warnings.
+
2001-06-08 Werner Lemberg <[email protected]>
* builds/unix/configure.in: Renamed to ...
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -147,7 +147,7 @@
if ( b < 0 ) { b = -b; s = -s; }
if ( c < 0 ) { c = -c; s = -s; }
- d = ( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c
+ d = (FT_Long)( c > 0 ? ( (FT_Int64)a * b + ( c >> 1 ) ) / c
: 0x7FFFFFFFL );
return ( s > 0 ) ? d : -d;
@@ -188,7 +188,7 @@
q = 0x7FFFFFFFL;
else
/* compute result directly */
- q = ( ((FT_Int64)a << 16) + (b >> 1)) / b;
+ q = (FT_UInt32)( ( ( (FT_Int64)a << 16 ) + ( b >> 1 ) ) / b );
return ( s < 0 ? -(FT_Long)q : (FT_Long)q );
}
@@ -232,7 +232,7 @@
} while ( r > s || r * r > l );
- return r;
+ return (FT_Int32)r;
}
#endif /* FT_CONFIG_OPTION_OLD_CALCS */