diff options
author | Chen Qun | 2020-08-27 13:03:09 +0200 |
---|---|---|
committer | Laurent Vivier | 2020-09-01 12:03:39 +0200 |
commit | 4b602b6003140afc981d70c9cd721fc96425dd90 (patch) | |
tree | bc55b7efa16fbebc7b789808666f0aafdad06ab4 /hw/usb | |
parent | vfio/platform: Remove dead assignment in vfio_intp_interrupt() (diff) | |
download | qemu-4b602b6003140afc981d70c9cd721fc96425dd90.tar.gz qemu-4b602b6003140afc981d70c9cd721fc96425dd90.tar.xz qemu-4b602b6003140afc981d70c9cd721fc96425dd90.zip |
usb/bus: Remove dead assignment in usb_get_fw_dev_path()
Clang static code analyzer show warning:
qemu/hw/usb/bus.c:615:13: warning: Value stored to 'pos' is never read
pos += snprintf(fw_path + pos, fw_len - pos, "%s@%lx",
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200827110311.164316-9-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c index b17bda3b29..2b11041451 100644 --- a/hw/usb/bus.c +++ b/hw/usb/bus.c @@ -612,8 +612,8 @@ static char *usb_get_fw_dev_path(DeviceState *qdev) in++; } else { /* the device itself */ - pos += snprintf(fw_path + pos, fw_len - pos, "%s@%lx", - qdev_fw_name(qdev), nr); + snprintf(fw_path + pos, fw_len - pos, "%s@%lx", + qdev_fw_name(qdev), nr); break; } } |