mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 00:33:34 +08:00
Fix some warnings and fix some simulator builds
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4688 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -377,7 +377,6 @@ errout_with_semaphore:
|
||||
static int fat_close(FAR struct file *filep)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct fat_mountpt_s *fs;
|
||||
struct fat_file_s *ff;
|
||||
int ret = OK;
|
||||
|
||||
@@ -389,9 +388,6 @@ static int fat_close(FAR struct file *filep)
|
||||
|
||||
ff = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
fs = inode->i_private;
|
||||
|
||||
DEBUGASSERT(fs != NULL);
|
||||
|
||||
/* Do not check if the mount is healthy. We must support closing of
|
||||
* the file even when there is healthy mount.
|
||||
@@ -1107,7 +1103,6 @@ static int fat_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct fat_mountpt_s *fs;
|
||||
struct fat_file_s *ff;
|
||||
int ret;
|
||||
|
||||
/* Sanity checks */
|
||||
@@ -1116,7 +1111,6 @@ static int fat_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
ff = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
fs = inode->i_private;
|
||||
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ static inline int file_vfcntl(int fildes, int cmd, va_list ap)
|
||||
FAR struct filelist *list;
|
||||
FAR struct file *this_file;
|
||||
int err = 0;
|
||||
int ret = 0;
|
||||
int ret = OK;
|
||||
|
||||
/* Get the thread-specific file list */
|
||||
|
||||
@@ -202,7 +202,7 @@ errout:
|
||||
errno = err;
|
||||
return ERROR;
|
||||
}
|
||||
return OK;
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_NFILE_DESCRIPTORS > 0 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user