From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org, qemu-trivial@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Max Reitz" <mreitz@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"John Snow" <jsnow@redhat.com>
Subject: [PATCH 3/3] hw/block/pflash_cfi02: Remove unneeded variable assignment
Date: Sat, 15 Feb 2020 17:15:57 +0100 [thread overview]
Message-ID: <20200215161557.4077-4-philmd@redhat.com> (raw)
In-Reply-To: <20200215161557.4077-1-philmd@redhat.com>
Fix warning reported by Clang static code analyzer:
CC hw/block/pflash_cfi02.o
hw/block/pflash_cfi02.c:311:5: warning: Value stored to 'ret' is never read
ret = -1;
^ ~~
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/block/pflash_cfi02.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 7c4744c020..12f18d401a 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -308,7 +308,6 @@ static uint64_t pflash_read(void *opaque, hwaddr offset, unsigned int width)
hwaddr boff;
uint64_t ret;
- ret = -1;
/* Lazy reset to ROMD mode after a certain amount of read accesses */
if (!pfl->rom_mode && pfl->wcycle == 0 &&
++pfl->read_counter > PFLASH_LAZY_ROMD_THRESHOLD) {
--
2.21.1
next prev parent reply other threads:[~2020-02-15 16:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 16:15 [PATCH 0/3] hw: Remove unneeded variable assignment Philippe Mathieu-Daudé
2020-02-15 16:15 ` [PATCH 1/3] block/qcow2-bitmap: " Philippe Mathieu-Daudé
2020-02-16 2:11 ` Richard Henderson
2020-02-16 21:12 ` Ján Tomko
2020-02-17 8:24 ` Vladimir Sementsov-Ogievskiy
2020-02-17 11:02 ` Kevin Wolf
2020-02-15 16:15 ` [PATCH 2/3] hw/display/qxl: " Philippe Mathieu-Daudé
2020-02-16 2:13 ` Richard Henderson
2020-02-18 19:15 ` Laurent Vivier
2020-02-15 16:15 ` Philippe Mathieu-Daudé [this message]
2020-02-16 2:14 ` [PATCH 3/3] hw/block/pflash_cfi02: " Richard Henderson
2020-02-18 19:16 ` Laurent Vivier
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=20200215161557.4077-4-philmd@redhat.com \
--to=philmd@redhat.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=vsementsov@virtuozzo.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).