qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: alex.bennee@linaro.org
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH 3/3] block/stream.c: ensure copy always set
Date: Mon, 23 Sep 2013 17:07:30 +0100	[thread overview]
Message-ID: <1379952450-29640-4-git-send-email-alex.bennee@linaro.org> (raw)
In-Reply-To: <1379952450-29640-1-git-send-email-alex.bennee@linaro.org>

From: Alex Bennée <alex@bennee.com>

This only showed up when compiling with
--enable-trace-backend=stderr|ftrace at which point the compiler
complains with the following:

block/stream.c: In function ‘stream_run’:
block/stream.c:141:22: error: ‘copy’ may be used uninitialized in this function [-Werror=uninitialized]

Not sure exactly why it needs these options but it does seem clear the
negative return case should be handled.
---
 block/stream.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/stream.c b/block/stream.c
index 078ce4a..3b9c198 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -136,6 +136,8 @@ wait:
             }
 
             copy = (ret == 1);
+        } else {
+            copy = false;
         }
         trace_stream_one_iteration(s, sector_num, n, ret);
         if (ret >= 0 && copy) {
-- 
1.8.4

  parent reply	other threads:[~2013-09-23 16:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23 16:07 [Qemu-devel] [PATCH v2 0/0] .travis and minor compile fixes alex.bennee
2013-09-23 16:07 ` [Qemu-devel] [PATCH 1/3] .travis.yml: basic compile and check recipes alex.bennee
2013-09-23 16:07 ` [Qemu-devel] [PATCH 2/3] .travis.yml: greatly expand the coverage + more builds alex.bennee
2013-09-23 16:07 ` alex.bennee [this message]
2013-09-24 12:06   ` [Qemu-devel] [PATCH 3/3] block/stream.c: ensure copy always set Stefan Hajnoczi
2013-09-24 14:27     ` Alex Bennée
2013-09-25  8:41       ` Stefan Hajnoczi
2013-09-24 11:41 ` [Qemu-devel] [PATCH v2 0/0] .travis and minor compile fixes Stefan Hajnoczi
2013-09-24 14:19   ` Alex Bennée
2013-09-25  8:33     ` Stefan Hajnoczi
2013-09-24 12:07 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379952450-29640-4-git-send-email-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).