From 53290ee39d0b4a61d75df3e7ef9372380352594e Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 19 Jul 2014 11:32:25 +0200 Subject: [PATCH] barrier: suppress false-positive warning If poll() returns, one of both revents must be set, thus "buf" is set by either clause. This is non-obvious for code-checkers so add an "else continue;" clause to suppress "uninitialized variable" warnings. --- src/shared/barrier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shared/barrier.c b/src/shared/barrier.c index 4ac42d023..4a5544de2 100644 --- a/src/shared/barrier.c +++ b/src/shared/barrier.c @@ -257,6 +257,8 @@ static bool barrier_read(Barrier *b, int64_t comp) { * guarantees that exit-abortions do not overwrite real * barriers. */ buf = BARRIER_ABORTION; + else + continue; /* lock if they aborted */ if (buf >= (uint64_t)BARRIER_ABORTION) { -- 2.30.2