From 9e9c8e020da6c68aa9ed7b9f834d70cb724a726b Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 14 Jan 2020 05:41:22 +0800 Subject: [PATCH 1/2] fix warning: format '%u' expects argument of type 'unsigned int *', but argument 3 has type 'uint16_t * Change-Id: I3eccf8e2cd917f19b7a9edab233b327297d74bb7 Signed-off-by: Xiang Xiao --- netutils/ftpc/ftpc_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netutils/ftpc/ftpc_transfer.c b/netutils/ftpc/ftpc_transfer.c index ecbb0f43478..6a0368073f6 100644 --- a/netutils/ftpc/ftpc_transfer.c +++ b/netutils/ftpc/ftpc_transfer.c @@ -139,7 +139,7 @@ static int ftp_cmd_epsv(FAR struct ftpc_session_s *session, * are supplied. */ - nscan = sscanf(ptr, "|||%u|", &tmp); + nscan = sscanf(ptr, "|||%hu|", &tmp); if (nscan != 1) { nwarn("WARNING: Error parsing EPSV reply: '%s'\n", session->reply); From c7edf5c65fc5e728f706749b0f50e96bae943a25 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 14 Jan 2020 06:21:19 +0800 Subject: [PATCH 2/2] fix warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' Change-Id: Ic59a1e9e49256637fa73459c46b8cded036cf971 Signed-off-by: Xiang Xiao --- system/ping6/ping6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/ping6/ping6.c b/system/ping6/ping6.c index c19b140db28..d892c31bbf6 100644 --- a/system/ping6/ping6.c +++ b/system/ping6/ping6.c @@ -172,7 +172,7 @@ static void ping6_result(FAR const struct ping6_result_s *result) case ICMPv6_I_ROUNDTRIP: inet_ntop(AF_INET6, result->dest.s6_addr16, strbuffer, INET6_ADDRSTRLEN); - printf("%ld bytes from %s icmp_seq=%u time=%u ms\n", + printf("%u bytes from %s icmp_seq=%u time=%u ms\n", result->info->datalen, strbuffer, result->seqno, result->extra); break;