diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-07-31 22:33:51 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-08-01 08:57:15 -0400 |
commit | 74c70166dc70486f3535d3c9d12071ea8a447389 (patch) | |
tree | 7e98215e4229e50d0787977dc4db6a0756744ad4 /rts/RetainerProfile.c | |
parent | 29f07b1de78198fa29dabafd7bf1f1f4ecdc7f54 (diff) | |
download | haskell-74c70166dc70486f3535d3c9d12071ea8a447389.tar.gz |
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
[-Werror=unused-but-set-variable]
RetainerSet *rtl;
^~~
|
1758 | RetainerSet *rtl;
| ^
```
Reviewers: austin, erikd, simonmar, Phyx
Reviewed By: Phyx
Subscribers: Phyx, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3801
Diffstat (limited to 'rts/RetainerProfile.c')
-rw-r--r-- | rts/RetainerProfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index 6ca09fc43e..1d5e9230c9 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -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; #endif @@ -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! |