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

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


The following commit(s) were added to refs/heads/master by this push:
     new d52a8298c Fix Error: ftpd.c:1773:9: error: variable 'pos' set but not 
used [-Werror,-Wunused-but-set-variable]
d52a8298c is described below

commit d52a8298ce0f0b129ec386267d3360ce045ad559
Author: Xiang Xiao <[email protected]>
AuthorDate: Wed Oct 26 11:14:15 2022 +0800

    Fix Error: ftpd.c:1773:9: error: variable 'pos' set but not used 
[-Werror,-Wunused-but-set-variable]
    
    Signed-off-by: Xiang Xiao <[email protected]>
---
 netutils/ftpd/ftpd.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/netutils/ftpd/ftpd.c b/netutils/ftpd/ftpd.c
index 333e6ab10..946b369ea 100644
--- a/netutils/ftpd/ftpd.c
+++ b/netutils/ftpd/ftpd.c
@@ -1770,7 +1770,6 @@ static int ftpd_stream(FAR struct ftpd_session_s 
*session, int cmdtype)
   size_t wantsize;
   ssize_t rdbytes;
   ssize_t wrbytes;
-  off_t pos = 0;
   int errval = 0;
   int ret;
 
@@ -1899,8 +1898,6 @@ static int ftpd_stream(FAR struct ftpd_session_s 
*session, int cmdtype)
           ret = -errval;
           goto errout_with_session;
         }
-
-      pos += (off_t)seekoffs;
     }
 
   /* Send success message */
@@ -2063,10 +2060,6 @@ static int ftpd_stream(FAR struct ftpd_session_s 
*session, int cmdtype)
           ret = -errval;
           break;
         }
-
-      /* Get the next file offset */
-
-      pos += (off_t)wrbytes;
     }
 
 errout_with_session:;

Reply via email to