1
0
Fork 0
forked from nuttx/nuttx-update

Remove compile warnings

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1089 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2008-10-28 00:41:50 +00:00
parent 642e2fd884
commit 7117e29e2a
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;
};
/****************************************************************************