diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-07-03 19:07:59 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-07-03 19:08:11 -0400 |
commit | 8f8d756c5a29217ff79154caa1696b6e572d186f (patch) | |
tree | 868ee6758b80e7af56907fa6a022eb9420ca811e /rts/sm | |
parent | 5aee331152c251525bc73b792660851dc5dddc29 (diff) | |
download | haskell-8f8d756c5a29217ff79154caa1696b6e572d186f.tar.gz |
rts: Fix uninitialised variable uses
Strangely gcc 5.4 compiling on amd64 (nixos) complained about these.
Both warnings look correct, so I'm not sure why we haven't been seeing
these up until now.
Test Plan: Validate
Reviewers: simonmar, austin, erikd
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3693
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/MarkWeak.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/MarkWeak.c b/rts/sm/MarkWeak.c index 691e56af5f..9a077b3d14 100644 --- a/rts/sm/MarkWeak.c +++ b/rts/sm/MarkWeak.c @@ -364,7 +364,7 @@ static void tidyThreadList (generation *gen) static void checkWeakPtrSanity(StgWeak *hd, StgWeak *tl) { StgWeak *w, *prev; - for (w = hd; w != NULL; prev = w, w = w->link) { + for (prev = NULL, w = hd; w != NULL; prev = w, w = w->link) { ASSERT(INFO_PTR_TO_STRUCT(UNTAG_CLOSURE((StgClosure*)w)->header.info)->type == WEAK || UNTAG_CLOSURE((StgClosure*)w)->header.info == &stg_DEAD_WEAK_info); checkClosure((StgClosure*)w); |