[raster] Fix clang issues.

Fix suggested by <octoploid@yandex.com>.

* src/raster/ftraster.c (ULong): New typedef.
(SCALED): Add proper cast.
This commit is contained in:
Werner Lemberg 2013-05-05 10:41:20 +02:00
parent e6e8362728
commit 073a0e2901
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2013-05-05 Werner Lemberg <wl@gnu.org>
[raster] Fix clang issues.
Fix suggested by <octoploid@yandex.com>.
* src/raster/ftraster.c (ULong): New typedef.
(SCALED): Add proper cast.
2013-05-04 Werner Lemberg <wl@gnu.org>
Fix clang fixes.

View File

@ -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 )