diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-07-19 11:32:25 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-07-19 11:32:25 +0200 |
commit | 53290ee39d0b4a61d75df3e7ef9372380352594e (patch) | |
tree | 614eb6d90bb9ca851e8f89d40270d20966916da7 | |
parent | a7850c7d1339b490ac021ff82c2081285ea28503 (diff) |
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.
-rw-r--r-- | src/shared/barrier.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/barrier.c b/src/shared/barrier.c index 4ac42d0239..4a5544de27 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) { |