[commit: packages/primitive] ghc-head: Fix compilation warning on OS X (939f6c1)

git at git.haskell.org git at git.haskell.org
Tue Nov 19 22:44:28 UTC 2013


Repository : ssh://git@git.haskell.org/primitive

On branch  : ghc-head
Link       : http://git.haskell.org/packages/primitive.git/commitdiff/939f6c1535796ee2ae88ff62209dd3d49f1ed886

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

commit 939f6c1535796ee2ae88ff62209dd3d49f1ed886
Author: Bryan O'Sullivan <bos at serpentine.com>
Date:   Tue Nov 19 13:07:17 2013 -0800

    Fix compilation warning on OS X


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

939f6c1535796ee2ae88ff62209dd3d49f1ed886
 cbits/primitive-memops.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cbits/primitive-memops.c b/cbits/primitive-memops.c
index 646ecaf..6c34648 100644
--- a/cbits/primitive-memops.c
+++ b/cbits/primitive-memops.c
@@ -19,7 +19,7 @@ void hsprimitive_memset_ ## TYPE (Hs ## TYPE *p, int off, int n, ATYPE x)    \
     memset(p, 0, n * sizeof(Hs ## TYPE));                                    \
   else if (sizeof(Hs ## TYPE) == sizeof(int)*2) {                            \
     int *q = (int *)p;                                                       \
-    const int *r = (const int *)&x;                                          \
+    const int *r = (const int *)(void *)&x;                                  \
     while (n>0) {                                                            \
       q[0] = r[0];                                                           \
       q[1] = r[1];                                                           \
@@ -49,4 +49,3 @@ MEMSET(Ptr, HsPtr)
 MEMSET(Float, HsFloat)
 MEMSET(Double, HsDouble)
 MEMSET(Char, HsChar)
-



More information about the ghc-commits mailing list