Many changes to reduce complaints from CppCheck. Several latent bugs fixes, but probably some new typos introduced

This commit is contained in:
Gregory Nutt
2014-02-10 18:08:49 -06:00
parent 8b1d3f6698
commit 91b002a043
82 changed files with 1932 additions and 1594 deletions
+3 -5
View File
@@ -1384,7 +1384,7 @@ int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath,
int ret;
#ifdef CONFIG_DEBUG
if (!alloc || !drvrpath || startsector < 0 || nsectors < 0)
if (!alloc || !drvrpath || startsector < 0)
{
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BINLUNINVALIDARGS1), 0);
return -EINVAL;
@@ -1722,11 +1722,9 @@ void usbmsc_uninitialize(FAR void *handle)
FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
FAR struct usbmsc_dev_s *priv;
irqstate_t flags;
#ifdef SDCC
pthread_addr_t result1, result2;
pthread_attr_t attr;
#endif
#if 0
void *value;
#endif
int i;
#ifdef CONFIG_DEBUG
+1 -1
View File
@@ -360,7 +360,7 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf)
{
#ifdef CONFIG_USBDEV_DUALSPEED
FAR const struct usb_epdesc_s *epdesc;
bool hispeed = (speed == USB_SPEED_HIGH);
bool hispeed;
#endif
/* Configuration descriptor. If the USB mass storage device is