diff options
author | Chen Qun <kuhn.chenqun@huawei.com> | 2020-08-27 19:03:09 +0800 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-09-01 12:03:39 +0200 |
commit | 4b602b6003140afc981d70c9cd721fc96425dd90 (patch) | |
tree | bc55b7efa16fbebc7b789808666f0aafdad06ab4 /hw/usb | |
parent | 9b83b0043f3d517ae588c344288ff615bd2b0713 (diff) | |
download | qemu-4b602b6003140afc981d70c9cd721fc96425dd90.zip qemu-4b602b6003140afc981d70c9cd721fc96425dd90.tar.gz qemu-4b602b6003140afc981d70c9cd721fc96425dd90.tar.bz2 |
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 b17bda3..2b11041 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; } } |