From 53efd71d6dbd46226e6cc2c0b27b84a05ab3defb Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 14 Jan 2020 10:21:13 +0800 Subject: [PATCH] Fix format warn (#13) * 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 * fix warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' Change-Id: Ic59a1e9e49256637fa73459c46b8cded036cf971 Signed-off-by: Xiang Xiao --- netutils/ftpc/ftpc_transfer.c | 2 +- system/ping6/ping6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netutils/ftpc/ftpc_transfer.c b/netutils/ftpc/ftpc_transfer.c index ecbb0f434..6a0368073 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); diff --git a/system/ping6/ping6.c b/system/ping6/ping6.c index c19b140db..d892c31bb 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;