From cf7d39fc8896a0e98a071c9c645e2e91f133b593 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 23 Nov 2022 19:42:13 -0500 Subject: rts: Fix type issues in Sparks.h Adds explicit casts to satisfy a C++ compiler. (cherry picked from commit 8623ab4bd7fb1326cebb3191fdee841af74bb345) --- rts/Sparks.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/Sparks.h b/rts/Sparks.h index 58817b80af..f0340d284f 100644 --- a/rts/Sparks.h +++ b/rts/Sparks.h @@ -56,7 +56,7 @@ INLINE_HEADER long sparkPoolSize (SparkPool *pool); INLINE_HEADER StgClosure* reclaimSpark(SparkPool *pool) { - return popWSDeque(pool); + return (StgClosure*) popWSDeque(pool); } INLINE_HEADER bool looksEmpty(SparkPool* deque) @@ -89,7 +89,7 @@ INLINE_HEADER void discardSparks (SparkPool *pool) INLINE_HEADER StgClosure * tryStealSpark (SparkPool *pool) { - return stealWSDeque_(pool); + return (StgClosure *) stealWSDeque_(pool); // use the no-loopy version, stealWSDeque_(), since if we get a // spurious NULL here the caller may want to try stealing from // other pools before trying again. -- cgit v1.2.1