[commit: ghc] master: Don't include a (void *) cast in BLOCK_ROUND_UP (4aa921e)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/4aa921e72d716ddeeb3ddf8d833996980395a77e

>---------------------------------------------------------------

commit 4aa921e72d716ddeeb3ddf8d833996980395a77e
Author: Ian Lynagh <[email protected]>
Date:   Tue Nov 13 15:58:17 2012 +0000

    Don't include a (void *) cast in BLOCK_ROUND_UP
    
    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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/includes/rts/storage/Block.h b/includes/rts/storage/Block.h
index 0a9b12b..008602a 100644
--- a/includes/rts/storage/Block.h
+++ b/includes/rts/storage/Block.h
@@ -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) */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.