Fix errors/warnings reported by eZ80 compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2239 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
4da26a9817
commit
cb89120bd4
@ -137,7 +137,7 @@ static int bch_close(FAR struct file *filp)
|
||||
{
|
||||
FAR struct inode *inode = filp->f_inode;
|
||||
FAR struct bchlib_s *bch;
|
||||
int ret;
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* drivers/bch/bchdev_unregister.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -105,10 +105,10 @@ int bchdev_unregister(const char *chardev)
|
||||
/* Open the character driver associated with chardev */
|
||||
|
||||
fd = open(chardev, O_RDONLY);
|
||||
if (ret < 0)
|
||||
if (fd < 0)
|
||||
{
|
||||
dbg("Failed to open %s: %d\n", chardev, -ret);
|
||||
return ret;
|
||||
dbg("Failed to open %s: %d\n", chardev, errno);
|
||||
return -errno;
|
||||
}
|
||||
|
||||
/* Get a reference to the internal data structure. On success, we
|
||||
|
@ -153,7 +153,9 @@ static ssize_t mmcsd_doread(FAR void *dev, FAR ubyte *buffer,
|
||||
off_t startblock, size_t nblocks)
|
||||
{
|
||||
struct mmcsd_state_s *priv = (struct mmcsd_state_s *)dev;
|
||||
#ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "Not implemented"
|
||||
#endif
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@ -169,7 +171,9 @@ static ssize_t mmcsd_dowrite(FAR void *dev, FAR const ubyte *buffer,
|
||||
off_t startblock, size_t nblocks)
|
||||
{
|
||||
struct mmcsd_state_s *priv = (struct mmcsd_state_s *)dev;
|
||||
#ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "Not implemented"
|
||||
#endif
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
@ -289,7 +293,9 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
if (geometry)
|
||||
{
|
||||
priv = (struct mmcsd_state_s *)inode->i_private;
|
||||
#warning "Not implemented"
|
||||
#ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "Not implemented"
|
||||
#endif
|
||||
return -ENOSYS;
|
||||
}
|
||||
return -EINVAL;
|
||||
@ -310,7 +316,9 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = (struct mmcsd_state_s *)inode->i_private;
|
||||
|
||||
#warning "Not implemented"
|
||||
#ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "Not implemented"
|
||||
#endif
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
@ -326,7 +334,9 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
|
||||
static int mmcsd_hwinitialize(struct mmcsd_state_s *priv)
|
||||
{
|
||||
#warning "Not implemented"
|
||||
#ifdef CONFIG_CPP_HAVE_WARNING
|
||||
# warning "Not implemented"
|
||||
#endif
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -152,12 +152,12 @@ static inline void m25p_pagewrite(struct m25p_dev_s *priv, FAR const ubyte *buff
|
||||
/* MTD driver methods */
|
||||
|
||||
static int m25p_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks);
|
||||
static int m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
|
||||
FAR ubyte *buf);
|
||||
static int m25p_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
|
||||
FAR const ubyte *buf);
|
||||
static int m25p_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes,
|
||||
FAR ubyte *buffer);
|
||||
static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock,
|
||||
size_t nblocks, FAR ubyte *buf);
|
||||
static ssize_t m25p_bwrite(FAR struct mtd_dev_s *dev, off_t startblock,
|
||||
size_t nblocks, FAR const ubyte *buf);
|
||||
static ssize_t m25p_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes,
|
||||
FAR ubyte *buffer);
|
||||
static int m25p_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg);
|
||||
|
||||
/************************************************************************************
|
||||
@ -477,7 +477,7 @@ static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb
|
||||
FAR ubyte *buffer)
|
||||
{
|
||||
FAR struct m25p_dev_s *priv = (FAR struct m25p_dev_s *)dev;
|
||||
off_t nbytes;
|
||||
ssize_t nbytes;
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
|
||||
@ -488,7 +488,7 @@ static ssize_t m25p_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb
|
||||
{
|
||||
return nbytes >> priv->pageshift;
|
||||
}
|
||||
return nbytes;
|
||||
return (int)nbytes;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -464,7 +464,7 @@ enum mmcsd_clock_e
|
||||
CLOCK_MMC_SLOW, /* MMC initialization clocking */
|
||||
CLOCK_SD_SLOW, /* SD initialization clocking */
|
||||
CLOCK_MMC_FAST, /* MMC normal operation clocking */
|
||||
CLOCK_SD_FAST, /* SD normal operation clocking */
|
||||
CLOCK_SD_FAST /* SD normal operation clocking */
|
||||
};
|
||||
|
||||
/* This structure defines the interface between the NuttX MMC/SD
|
||||
|
@ -89,10 +89,10 @@ struct mtd_dev_s
|
||||
|
||||
/* Read/write from the specified read/write blocks */
|
||||
|
||||
int (*bread)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
|
||||
FAR ubyte *buffer);
|
||||
int (*bwrite)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
|
||||
FAR const ubyte *buffer);
|
||||
ssize_t (*bread)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
|
||||
FAR ubyte *buffer);
|
||||
ssize_t (*bwrite)(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblocks,
|
||||
FAR const ubyte *buffer);
|
||||
|
||||
/* Some devices may support byte oriented read (optional). Byte-oriented
|
||||
* writing is inherently block oriented on most MTD devices and is not supported.
|
||||
@ -100,8 +100,8 @@ struct mtd_dev_s
|
||||
* buffering.
|
||||
*/
|
||||
|
||||
int (*read)(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes,
|
||||
FAR ubyte *buffer);
|
||||
ssize_t (*read)(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes,
|
||||
FAR ubyte *buffer);
|
||||
|
||||
/* Support other, less frequently used commands:
|
||||
* - MTDIOC_GEOMETRY: Get MTD geometry
|
||||
|
Loading…
Reference in New Issue
Block a user