[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/33] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_
From: |
Laurent Vivier |
Subject: |
[PULL 33/33] monitor/hmp-cmds: Remove redundant statement in hmp_rocker_of_dpa_groups() |
Date: |
Mon, 9 Mar 2020 16:08:37 +0100 |
From: Chen Qun <address@hidden>
Clang static code analyzer show warning:
monitor/hmp-cmds.c:2867:17: warning: Value stored to 'set' is never read
set = true;
^ ~~~~
Reported-by: Euler Robot <address@hidden>
Signed-off-by: Chen Qun <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
monitor/hmp-cmds.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index fb4c2fd2a875..6fd7aca5007b 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -2842,7 +2842,6 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict
*qdict)
const char *name = qdict_get_str(qdict, "name");
uint8_t type = qdict_get_try_int(qdict, "type", 9);
Error *err = NULL;
- bool set = false;
list = qmp_query_rocker_of_dpa_groups(name, type != 9, type, &err);
if (err != NULL) {
@@ -2854,6 +2853,7 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict
*qdict)
for (g = list; g; g = g->next) {
RockerOfDpaGroup *group = g->value;
+ bool set = false;
monitor_printf(mon, "0x%08x", group->id);
@@ -2898,14 +2898,11 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict
*qdict)
if (group->has_set_eth_dst) {
if (!set) {
- set = true;
monitor_printf(mon, " set");
}
monitor_printf(mon, " dst %s", group->set_eth_dst);
}
- set = false;
-
if (group->has_ttl_check && group->ttl_check) {
monitor_printf(mon, " check TTL");
}
--
2.24.1
- [PULL 07/33] virtfs-proxy-helper: Make the helper_opts[] array const, (continued)
- [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, 2020/03/09
- [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 <=
- [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
- Re: [PULL 00/33] Trivial branch patches, Philippe Mathieu-Daudé, 2020/03/09
- Re: [PULL 00/33] Trivial branch patches, Laurent Vivier, 2020/03/10
- Re: [PULL 00/33] Trivial branch patches, Kevin Wolf, 2020/03/10
- Re: [PULL 00/33] Trivial branch patches, Philippe Mathieu-Daudé, 2020/03/10
- Re: [PULL 00/33] Trivial branch patches, Daniel P . Berrangé, 2020/03/10
- Re: [PULL 00/33] Trivial branch patches, Kevin Wolf, 2020/03/10