From 266fe174619cb0af9e74b02e7dc99fac302c9513 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sun, 23 Jan 2022 12:28:38 +0100 Subject: [PATCH] bmp_libusb: Restrict scope of variable --- src/platforms/hosted/bmp_libusb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platforms/hosted/bmp_libusb.c b/src/platforms/hosted/bmp_libusb.c index c6bcf2f..79d4a85 100644 --- a/src/platforms/hosted/bmp_libusb.c +++ b/src/platforms/hosted/bmp_libusb.c @@ -146,7 +146,6 @@ int find_debuggers(BMP_CL_OPTIONS_t *cl_opts,bmp_info_t *info) char serial[64]; char manufacturer[128]; char product[128]; - bmp_type_t type; bool access_problems = false; char *active_cable = NULL; bool ftdi_unknown = false; @@ -159,7 +158,7 @@ int find_debuggers(BMP_CL_OPTIONS_t *cl_opts,bmp_info_t *info) active_cable = NULL; ftdi_unknown = false; for (int i = 0; devs[i]; i++) { - type = BMP_TYPE_NONE; + bmp_type_t type = BMP_TYPE_NONE; libusb_device *dev = devs[i]; int res = libusb_get_device_descriptor(dev, &desc); if (res < 0) {