Don't include a (void *) cast in BLOCK_ROUND_UP
authorIan Lynagh <ian@well-typed.com>
Tue, 13 Nov 2012 15:58:17 +0000 (15:58 +0000)
committerIan Lynagh <ian@well-typed.com>
Tue, 13 Nov 2012 15:58:17 +0000 (15:58 +0000)
All uses of it cast the result anyway. However, DeriveConstants needs
it to not include the cast, as (void *) casts can't be used in constant
expressions.

includes/rts/storage/Block.h

index 0a9b12b..008602a 100644 (file)
@@ -19,7 +19,7 @@
 #define BLOCK_SIZE_W (BLOCK_SIZE/sizeof(W_))
 #define BLOCK_MASK   (BLOCK_SIZE-1)
 
-#define BLOCK_ROUND_UP(p)   ((void *) (((W_)(p)+BLOCK_SIZE-1) & ~BLOCK_MASK))
+#define BLOCK_ROUND_UP(p)   (((W_)(p)+BLOCK_SIZE-1) & ~BLOCK_MASK)
 #define BLOCK_ROUND_DOWN(p) ((void *) ((W_)(p) & ~BLOCK_MASK))
 
 /* Megablock related constants (MBLOCK_SHIFT is defined in Constants.h) */