[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/33] block/stream: Remove redundant statement in stream_run()
From: |
Laurent Vivier |
Subject: |
[PULL 27/33] block/stream: Remove redundant statement in stream_run() |
Date: |
Mon, 9 Mar 2020 16:08:31 +0100 |
From: Chen Qun <address@hidden>
Clang static code analyzer show warning:
block/stream.c:186:9: warning: Value stored to 'ret' is never read
ret = 0;
^ ~
Reported-by: Euler Robot <address@hidden>
Signed-off-by: Chen Qun <address@hidden>
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
block/stream.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/stream.c b/block/stream.c
index 5562ccbf577a..aa2e7af98e37 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -114,7 +114,6 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
int64_t offset = 0;
uint64_t delay_ns = 0;
int error = 0;
- int ret = 0;
int64_t n = 0; /* bytes */
if (bs == s->bottom) {
@@ -139,6 +138,7 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
for ( ; offset < len; offset += n) {
bool copy;
+ int ret;
/* Note that even when no rate limit is applied we need to yield
* with no pending I/O here so that bdrv_drain_all() returns.
@@ -183,7 +183,6 @@ static int coroutine_fn stream_run(Job *job, Error **errp)
break;
}
}
- ret = 0;
/* Publish progress */
job_progress_update(&s->common.job, n);
--
2.24.1
- [PULL 21/33] hw/pci-host/piix: Include "qemu/range.h", (continued)
- [PULL 21/33] hw/pci-host/piix: Include "qemu/range.h", Laurent Vivier, 2020/03/09
- [PULL 26/33] core/qdev: fix memleak in qdev_get_gpio_out_connector(), Laurent Vivier, 2020/03/09
- [PULL 07/33] virtfs-proxy-helper: Make the helper_opts[] array const, Laurent Vivier, 2020/03/09
- [PULL 16/33] hw/hppa/machine: Include "net/net.h", Laurent Vivier, 2020/03/09
- [PULL 25/33] hw/i386/pc: Clean up includes, Laurent Vivier, 2020/03/09
- [PULL 23/33] hw/i386: Include "hw/mem/nvdimm.h", Laurent Vivier, 2020/03/09
- [PULL 28/33] block/file-posix: Remove redundant statement in raw_handle_perm_lock(), Laurent Vivier, 2020/03/09
- [PULL 31/33] display/pxa2xx_lcd: Remove redundant statement in pxa2xx_palette_parse(), Laurent Vivier, 2020/03/09
- [PULL 32/33] display/exynos4210_fimd: Remove redundant statement in exynos4210_fimd_update(), Laurent Vivier, 2020/03/09
- [PULL 24/33] hw/pci-host/q35: Remove unused includes, Laurent Vivier, 2020/03/09
- [PULL 27/33] block/stream: Remove redundant statement in stream_run(),
Laurent Vivier <=
- [PULL 30/33] scsi/scsi-disk: Remove redundant statement in scsi_disk_emulate_command(), Laurent Vivier, 2020/03/09
- [PULL 33/33] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups(), Laurent Vivier, 2020/03/09
- [PULL 29/33] dma/xlnx-zdma: Remove redundant statement in zdma_write_dst(), Laurent Vivier, 2020/03/09
- Re: [PULL 00/33] Trivial branch patches, no-reply, 2020/03/09
- Re: [PULL 00/33] Trivial branch patches, Peter Maydell, 2020/03/09
- Re: [PULL 00/33] Trivial branch patches, Michael S. Tsirkin, 2020/03/09