aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/host-libusb.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-10-04 15:08:22 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-10-06 13:27:48 +0200
commite7121b15411d0a9220d82d293537b91841f47c82 (patch)
tree3283695ed1fbbfd1c049a3fcf323ac3e73c94cdd /hw/usb/host-libusb.c
parent0edc9e45f3d6b0601f3628df2ca78b3ee78aa662 (diff)
hw/usb: Silence compiler warnings in USB code when compiling with -Wshadow
Rename variables or remove nested definitions where it makes sense, so that we can finally compile the USB code with "-Wshadow", too. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20231004130822.113343-1-thuth@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/usb/host-libusb.c')
-rw-r--r--hw/usb/host-libusb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index f500db85ab..d7060a42d5 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -1010,7 +1010,7 @@ static int usb_host_open(USBHostDevice *s, libusb_device *dev, int hostfd)
* Speeds are defined in linux/usb/ch9.h, file not included
* due to name conflicts.
*/
- int rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL);
+ rc = ioctl(hostfd, USBDEVFS_GET_SPEED, NULL);
switch (rc) {
case 1: /* low */
libusb_speed = LIBUSB_SPEED_LOW;