Skip to content
Snippets Groups Projects
Commit 7117e29e authored by patacongo's avatar patacongo
Browse files

Remove compile warnings

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1089 42af7a65-404d-4744-a932-0658087f49c3
parent 642e2fd8
No related branches found
No related tags found
No related merge requests found
......@@ -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
{
priv->lun = NULL;
/* Only a few commands may specify unsupported LUNs */
/* Only a few commands may specify unsupported LUNs */
if ((flags & USBSTRG_FLAGS_LUNNOTNEEDED) == 0)
{
usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDBADLUN), priv->cbwlun);
ret = -EINVAL;
}
else if ((flags & USBSTRG_FLAGS_LUNNOTNEEDED) == 0)
{
usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDBADLUN), priv->cbwlun);
ret = -EINVAL;
}
/* Extract the direction and data transfer length */
......
......@@ -41,6 +41,7 @@
#include <nuttx/config.h>
#include <stdio.h>
#include <sys/types.h>
#include <debug.h>
#include <errno.h>
......
......@@ -204,7 +204,7 @@ struct spi_ops_s
struct spi_dev_s
{
struct spi_ops_s *ops;
const struct spi_ops_s *ops;
};
/****************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment