You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/01/14 02:21:19 UTC
[incubator-nuttx-apps] branch pr13 updated: Fix format warn (#13)
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch pr13
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/pr13 by this push:
new 53efd71 Fix format warn (#13)
53efd71 is described below
commit 53efd71d6dbd46226e6cc2c0b27b84a05ab3defb
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Tue Jan 14 10:21:13 2020 +0800
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 <xi...@xiaomi.com>
* fix warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int'
Change-Id: Ic59a1e9e49256637fa73459c46b8cded036cf971
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
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 ecbb0f4..6a03680 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 c19b140..d892c31 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;