Fix usbdev/usbmsc_desc.c:316:7: error: variable 'length' set but not used [-Werror,-Wunused-but-set-variable]
@@ -313,7 +313,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
FAR struct usbdev_devinfo_s *devinfo)
#endif
{
- int length = 0;
bool hispeed = false;
#ifdef CONFIG_USBDEV_DUALSPEED
@@ -360,7 +359,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
dest->mxpower = (CONFIG_USBDEV_MAXPOWER + 1) / 2; /* Max power (mA/2) */
buf += sizeof(struct usb_cfgdesc_s);
- length += sizeof(struct usb_cfgdesc_s);
}
#endif
@@ -382,7 +380,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
dest->iif = devinfo->strbase + USBMSC_INTERFACESTRID; /* iInterface */
buf += sizeof(struct usb_ifdesc_s);
- length += sizeof(struct usb_ifdesc_s);
}
/* Make the two endpoint configurations */
@@ -395,7 +392,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
devinfo, hispeed);
buf += len;
- length += len;
}
/* Bulk OUT endpoint descriptor */
@@ -406,7 +402,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
hispeed);
buf += len;
- length += len;
}
return SIZEOF_USBMSC_CFGDESC;
