From 706b20a49f9103ee9d70d7bd028c2702b76bc730 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 12 Oct 2018 14:58:21 -0600 Subject: [PATCH] fs/vfs/fs_read.c: Elimnate a warning noted by Anonymouns in Issue 124. --- fs/vfs/fs_read.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/vfs/fs_read.c b/fs/vfs/fs_read.c index 8b0c96d6ae..35bbede925 100644 --- a/fs/vfs/fs_read.c +++ b/fs/vfs/fs_read.c @@ -119,7 +119,7 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes) * Name: nx_read * * Description: - * nx_read() is an interanl OS interface. It is functionally similar to + * nx_read() is an internal OS interface. It is functionally similar to * the standard read() interface except: * * - It does not modify the errno variable, and @@ -138,8 +138,6 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes) ssize_t nx_read(int fd, FAR void *buf, size_t nbytes) { - ssize_t ret; - /* Did we get a valid file descriptor? */ #if CONFIG_NFILE_DESCRIPTORS > 0 @@ -163,6 +161,7 @@ ssize_t nx_read(int fd, FAR void *buf, size_t nbytes) else { FAR struct file *filep; + ssize_t ret; /* The descriptor is in a valid range to file descriptor... do the * read. First, get the file structure. Note that on failure,