9
0
Fork 0

Remove compile warnings

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1089 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2008-10-28 00:41:50 +00:00
parent 9dd4bd6b3f
commit 2d344fd67c
3 changed files with 9 additions and 12 deletions

View File

@ -1332,7 +1332,7 @@ static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, ubyte cdblen, ubyte flags)
{
FAR struct usbstrg_lun_s *lun;
FAR struct usbstrg_lun_s *lun = NULL;
uint32 datlen;
ubyte dir = flags & USBSTRG_FLAGS_DIRMASK;
int ret = OK;
@ -1351,17 +1351,13 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, ubyte cdblen,
lun = &priv->luntab[priv->cbwlun];
priv->lun = lun;
}
else
/* Only a few commands may specify unsupported LUNs */
else if ((flags & USBSTRG_FLAGS_LUNNOTNEEDED) == 0)
{
priv->lun = NULL;
/* Only a few commands may specify unsupported LUNs */
if ((flags & USBSTRG_FLAGS_LUNNOTNEEDED) == 0)
{
usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDBADLUN), priv->cbwlun);
ret = -EINVAL;
}
usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDBADLUN), priv->cbwlun);
ret = -EINVAL;
}
/* Extract the direction and data transfer length */

View File

@ -41,6 +41,7 @@
#include <nuttx/config.h>
#include <stdio.h>
#include <sys/types.h>
#include <debug.h>
#include <errno.h>

View File

@ -204,7 +204,7 @@ struct spi_ops_s
struct spi_dev_s
{
struct spi_ops_s *ops;
const struct spi_ops_s *ops;
};
/****************************************************************************