shithub: freetype+ttf2subf

Download patch

ref: 073a0e2901e931d457f205d870ee77eb0ed763cb
parent: e6e8362728e2d644835c705ce735c8cc8f4a20a5
author: Werner Lemberg <[email protected]>
date: Sun May 5 06:41:20 EDT 2013

[raster] Fix clang issues.

Fix suggested by <[email protected]>.

* src/raster/ftraster.c (ULong): New typedef.
(SCALED): Add proper cast.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-05-05  Werner Lemberg  <[email protected]>
+
+	[raster] Fix clang issues.
+
+	Fix suggested by <[email protected]>.
+
+	* src/raster/ftraster.c (ULong): New typedef.
+	(SCALED): Add proper cast.
+
 2013-05-04  Werner Lemberg  <[email protected]>
 
 	Fix clang fixes.
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -310,6 +310,7 @@
   typedef short           Short;
   typedef unsigned short  UShort, *PUShort;
   typedef long            Long, *PLong;
+  typedef unsigned long   ULong;
 
   typedef unsigned char   Byte, *PByte;
   typedef char            Bool;
@@ -448,9 +449,9 @@
 
 #define FLOOR( x )    ( (x) & -ras.precision )
 #define CEILING( x )  ( ( (x) + ras.precision - 1 ) & -ras.precision )
-#define TRUNC( x )    ( (signed long)(x) >> ras.precision_bits )
+#define TRUNC( x )    ( (Long)(x) >> ras.precision_bits )
 #define FRAC( x )     ( (x) & ( ras.precision - 1 ) )
-#define SCALED( x )   ( ( (x) << ras.scale_shift ) - ras.precision_half )
+#define SCALED( x )   ( ( (ULong)(x) << ras.scale_shift ) - ras.precision_half )
 
 #define IS_BOTTOM_OVERSHOOT( x )  ( CEILING( x ) - x >= ras.precision_half )
 #define IS_TOP_OVERSHOOT( x )     ( x - FLOOR( x ) >= ras.precision_half )