Commit 74c70166 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

rts: Fix "variable set but not used" warning

gcc complains about this while building with Hadrian,
rts/RetainerProfile.c: In function ‘computeRetainerSet’:

rts/RetainerProfile.c:1758:18: error:
     error: variable ‘rtl’ set but not used
         RetainerSet *rtl;
1758 |     RetainerSet *rtl;
     |                  ^

Reviewers: austin, erikd, simonmar, Phyx

Reviewed By: Phyx

Subscribers: Phyx, rwbarton, thomie

Differential Revision:
parent 29f07b1d
......@@ -1755,11 +1755,11 @@ static void
computeRetainerSet( void )
StgWeak *weak;
RetainerSet *rtl;
uint32_t g, n;
StgPtr ml;
bdescr *bd;
#if defined(DEBUG_RETAINER)
RetainerSet *rtl;
RetainerSet tmpRetainerSet;
......@@ -1801,9 +1801,9 @@ computeRetainerSet( void )
for (ml = bd->start; ml < bd->free; ml++) {
maybeInitRetainerSet((StgClosure *)*ml);
rtl = retainerSetOf((StgClosure *)*ml);
#if defined(DEBUG_RETAINER)
rtl = retainerSetOf((StgClosure *)*ml);
if (rtl == NULL) {
// first visit to *ml
// This is a violation of the interface rule!
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment