qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"Michael Tokarev" <mjt@tls.msk.ru>,
	"Yuval Shaia" <yuval.shaia.ml@gmail.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Marek Vasut" <marex@denx.de>,
	qemu-block@nongnu.org, qemu-trivial@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>, "Jiri Pirko" <jiri@resnulli.us>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	qemu-arm@nongnu.org, "Richard Henderson" <rth@twiddle.net>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Thomas Huth" <huth@tuxfamily.org>,
	"Chris Wulff" <crwulff@gmail.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Max Reitz" <mreitz@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PULL 14/17] hw/block/pflash_cfi02: Remove unneeded variable assignment
Date: Wed, 19 Feb 2020 11:16:09 +0100	[thread overview]
Message-ID: <20200219101612.1033925-15-laurent@vivier.eu> (raw)
In-Reply-To: <20200219101612.1033925-1-laurent@vivier.eu>

From: Philippe Mathieu-Daudé <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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200215161557.4077-4-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 7c4744c020c1..12f18d401a85 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.24.1



  parent reply	other threads:[~2020-02-19 10:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 10:15 [PULL 00/17] Trivial branch patches Laurent Vivier
2020-02-19 10:15 ` [PULL 01/17] mailmap: Add entry for Yu-Chen Lin Laurent Vivier
2020-02-19 10:15 ` [PULL 02/17] Report stringified errno in VFIO related errors Laurent Vivier
2020-02-19 10:15 ` [PULL 03/17] scripts/checkpatch.pl: Detect superfluous semicolon in C code Laurent Vivier
2020-02-19 10:15 ` [PULL 04/17] audio/alsaaudio: Remove superfluous semicolons Laurent Vivier
2020-02-19 10:16 ` [PULL 05/17] hw/arm/xlnx-versal: Remove superfluous semicolon Laurent Vivier
2020-02-19 10:16 ` [PULL 06/17] hw/m68k/next-cube: " Laurent Vivier
2020-02-19 10:16 ` [PULL 07/17] hw/scsi/esp: " Laurent Vivier
2020-02-19 10:16 ` [PULL 08/17] hw/vfio/display: " Laurent Vivier
2020-02-19 10:16 ` [PULL 09/17] ui/input-barrier: " Laurent Vivier
2020-02-19 10:16 ` [PULL 10/17] target/i386/whpx: " Laurent Vivier
2020-02-19 10:16 ` [PULL 11/17] tests/qtest/libqos/qgraph: Remove superfluous semicolons Laurent Vivier
2020-02-19 10:16 ` [PULL 12/17] contrib/rdmacm-mux: Remove superfluous semicolon Laurent Vivier
2020-02-19 10:16 ` [PULL 13/17] hw/display/qxl: Remove unneeded variable assignment Laurent Vivier
2020-02-19 10:16 ` Laurent Vivier [this message]
2020-02-19 10:16 ` [PULL 15/17] hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP) Laurent Vivier
2020-02-19 10:16 ` [PULL 16/17] hw/nios2:fix leak of fdevice tree blob Laurent Vivier
2020-02-19 10:16 ` [PULL 17/17] hw/xtensa/xtfpga:fix " Laurent Vivier
2020-02-20 17:35 ` [PULL 00/17] Trivial branch patches Peter Maydell

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=20200219101612.1033925-15-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=alex.williamson@redhat.com \
    --cc=alistair@alistair23.me \
    --cc=crwulff@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=huth@tuxfamily.org \
    --cc=jasowang@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marex@denx.de \
    --cc=mjt@tls.msk.ru \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    --cc=yuval.shaia.ml@gmail.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).