From fff682f4cd3e29aa423720512977d63e2a4e3bc4 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 9 Jan 2006 14:35:31 +0000 Subject: [PATCH] [project @ 2006-01-09 14:35:31 by simonmar] Avoid "dereferencing type-punned pointer will break strict-aliasing rules" warnings --- ghc/rts/GCCompact.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc/rts/GCCompact.c b/ghc/rts/GCCompact.c index e53429c..58753fe 100644 --- a/ghc/rts/GCCompact.c +++ b/ghc/rts/GCCompact.c @@ -929,10 +929,10 @@ compact( void (*get_roots)(evac_fn) ) // the weak pointer lists... if (weak_ptr_list != NULL) { - thread((StgPtr)&weak_ptr_list); + thread((StgPtr)(void *)&weak_ptr_list); } if (old_weak_ptr_list != NULL) { - thread((StgPtr)&old_weak_ptr_list); // tmp + thread((StgPtr)(void *)&old_weak_ptr_list); // tmp } // mutable lists @@ -947,10 +947,10 @@ compact( void (*get_roots)(evac_fn) ) } // the global thread list - thread((StgPtr)&all_threads); + thread((StgPtr)(void *)&all_threads); // any threads resurrected during this GC - thread((StgPtr)&resurrected_threads); + thread((StgPtr)(void *)&resurrected_threads); // the task list { -- 1.7.10.4