From: David Herrmann Date: Sat, 19 Jul 2014 09:32:25 +0000 (+0200) Subject: barrier: suppress false-positive warning X-Git-Tag: v216~486 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53290ee39d0b4a61d75df3e7ef9372380352594e;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/shared/barrier.c b/src/shared/barrier.c index 4ac42d02394..4a5544de27d 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) {