[systemd-commits] src/shared
David Herrmann
dvdhrm at kemper.freedesktop.org
Sat Jul 19 02:34:32 PDT 2014
src/shared/barrier.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 53290ee39d0b4a61d75df3e7ef9372380352594e
Author: David Herrmann <dh.herrmann at gmail.com>
Date: Sat Jul 19 11:32:25 2014 +0200
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 4ac42d0..4a5544d 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) {
More information about the systemd-commits
mailing list