You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/07/30 14:16:35 UTC

[incubator-nuttx] 03/08: libs/libc/stdio/lib_libfread.c: Remove a redundant assignment

This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit d02354c766d7396def75723603f516ae89614a64
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Jul 30 16:52:09 2020 +0900

    libs/libc/stdio/lib_libfread.c: Remove a redundant assignment
    
    Found by clang-check:
    
    stdio/lib_libfread.c:75:7: warning: Value stored to 'bytes_read' is never read
          bytes_read = -1;
          ^            ~~
    1 warning generated.
---
 libs/libc/stdio/lib_libfread.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libs/libc/stdio/lib_libfread.c b/libs/libc/stdio/lib_libfread.c
index de80754..6c55f6c 100644
--- a/libs/libc/stdio/lib_libfread.c
+++ b/libs/libc/stdio/lib_libfread.c
@@ -72,7 +72,6 @@ ssize_t lib_fread(FAR void *ptr, size_t count, FAR FILE *stream)
   if (!stream || (stream->fs_oflags & O_RDOK) == 0)
     {
       set_errno(EBADF);
-      bytes_read = -1;
     }
   else
     {