From d52a8298ce0f0b129ec386267d3360ce045ad559 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 26 Oct 2022 11:14:15 +0800 Subject: [PATCH] Fix Error: ftpd.c:1773:9: error: variable 'pos' set but not used [-Werror,-Wunused-but-set-variable] Signed-off-by: Xiang Xiao --- 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:;