Commit 69e010fdea63f3d651d07749babce852d4d51ad2

Werner Lemberg 2000-04-10T22:50:20

Removed compiler warnings.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/demos/src/ftgrays.c b/demos/src/ftgrays.c
index 899789d..a8de4f4 100644
--- a/demos/src/ftgrays.c
+++ b/demos/src/ftgrays.c
@@ -105,8 +105,13 @@
 #define  CEILING(x)  (((x)+ONE_PIXEL-1) & -ONE_PIXEL)
 #define  ROUND(x)    (((x)+ONE_PIXEL/2) & -ONE_PIXEL)
 
-#define  UPSCALE(x)  (PIXEL_BITS >= 6 ? (x) << (PIXEL_BITS-6) : (x) >> (6-PIXEL_BITS))
-#define  DOWNSCALE(x)  (PIXEL_BITS >= 6 ? (x) >> (PIXEL_BITS-6) : (x) << (6-PIXEL_BITS))
+#if PIXEL_BITS >= 6
+#define  UPSCALE(x)  ((x) << (PIXEL_BITS-6))
+#define  DOWNSCALE(x)  ((x) >> (PIXEL_BITS-6))
+#else
+#define  UPSCALE(x)  ((x) >> (6-PIXEL_BITS))
+#define  DOWNSCALE(x)  ((x) << (6-PIXEL_BITS))
+#endif
 
 /* define if you want to use more compact storage, this increases the number */
 /* of cells available in the render pool but slows down the rendering a bit  */