Fix usbdev/usbmsc_desc.c:316:7: error: variable 'length' set but not used [-Werror,-Wunused-but-set-variable]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d8babf8dfd
commit
929882862b
@ -313,7 +313,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
|
|||||||
FAR struct usbdev_devinfo_s *devinfo)
|
FAR struct usbdev_devinfo_s *devinfo)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int length = 0;
|
|
||||||
bool hispeed = false;
|
bool hispeed = false;
|
||||||
|
|
||||||
#ifdef CONFIG_USBDEV_DUALSPEED
|
#ifdef CONFIG_USBDEV_DUALSPEED
|
||||||
@ -359,8 +358,7 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
|
|||||||
USBMSC_REMOTEWAKEUP;
|
USBMSC_REMOTEWAKEUP;
|
||||||
dest->mxpower = (CONFIG_USBDEV_MAXPOWER + 1) / 2; /* Max power (mA/2) */
|
dest->mxpower = (CONFIG_USBDEV_MAXPOWER + 1) / 2; /* Max power (mA/2) */
|
||||||
|
|
||||||
buf += sizeof(struct usb_cfgdesc_s);
|
buf += sizeof(struct usb_cfgdesc_s);
|
||||||
length += sizeof(struct usb_cfgdesc_s);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -381,8 +379,7 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
|
|||||||
dest->protocol = USBMSC_PROTO_BULKONLY; /* Interface protocol */
|
dest->protocol = USBMSC_PROTO_BULKONLY; /* Interface protocol */
|
||||||
dest->iif = devinfo->strbase + USBMSC_INTERFACESTRID; /* iInterface */
|
dest->iif = devinfo->strbase + USBMSC_INTERFACESTRID; /* iInterface */
|
||||||
|
|
||||||
buf += sizeof(struct usb_ifdesc_s);
|
buf += sizeof(struct usb_ifdesc_s);
|
||||||
length += sizeof(struct usb_ifdesc_s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make the two endpoint configurations */
|
/* Make the two endpoint configurations */
|
||||||
@ -395,7 +392,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
|
|||||||
devinfo, hispeed);
|
devinfo, hispeed);
|
||||||
|
|
||||||
buf += len;
|
buf += len;
|
||||||
length += len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bulk OUT endpoint descriptor */
|
/* Bulk OUT endpoint descriptor */
|
||||||
@ -406,7 +402,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf,
|
|||||||
hispeed);
|
hispeed);
|
||||||
|
|
||||||
buf += len;
|
buf += len;
|
||||||
length += len;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return SIZEOF_USBMSC_CFGDESC;
|
return SIZEOF_USBMSC_CFGDESC;
|
||||||
|
Loading…
Reference in New Issue
Block a user