From ab7cb90f88c3207c6764e71a0fd3c108ad03d5e1 Mon Sep 17 00:00:00 2001 From: Fotis Panagiotopoulos Date: Tue, 4 Oct 2022 12:45:20 +0300 Subject: [PATCH] ftpd: Fixed compiler warnings. --- netutils/ftpd/ftpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netutils/ftpd/ftpd.c b/netutils/ftpd/ftpd.c index 4aff864a3..333e6ab10 100644 --- a/netutils/ftpd/ftpd.c +++ b/netutils/ftpd/ftpd.c @@ -990,7 +990,7 @@ static ssize_t ftpd_send(int sd, FAR const void *data, size_t size, ret = send(sd, data, size, 0); if (ret < 0) { - ssize_t errval = errno; + int errval = errno; nerr("ERROR: send() failed: %d\n", errval); return -errval; } @@ -1958,7 +1958,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (rdbytes < 0) { - nerr("ERROR: Read failed: rdbytes=%d errval=%d\n", + nerr("ERROR: Read failed: rdbytes=%zu errval=%d\n", rdbytes, errval); ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 550, ' ', "Data read error !"); @@ -2056,7 +2056,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (wrbytes != ((ssize_t)buflen)) { - nerr("ERROR: Write failed: wrbytes=%d errval=%d\n", + nerr("ERROR: Write failed: wrbytes=%zu errval=%d\n", wrbytes, errval); ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 550, ' ', "Data send error !");