You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/06/23 04:05:59 UTC
[nuttx-apps] branch master updated: apps: correct print specifiers to fix compilation warnings
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new c9c4cc13e apps: correct print specifiers to fix compilation warnings
c9c4cc13e is described below
commit c9c4cc13e6154a8ac7e28325afd3f22d1f84c4d8
Author: Petro Karashchenko <pe...@gmail.com>
AuthorDate: Fri Jun 23 00:45:57 2023 +0300
apps: correct print specifiers to fix compilation warnings
Signed-off-by: Petro Karashchenko <pe...@gmail.com>
---
examples/rpmsgsocket/rpsock_client.c | 8 ++++----
examples/rpmsgsocket/rpsock_server.c | 4 ++--
system/uorb/listener.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/examples/rpmsgsocket/rpsock_client.c b/examples/rpmsgsocket/rpsock_client.c
index d80204d5d..e1f8bfd36 100644
--- a/examples/rpmsgsocket/rpsock_client.c
+++ b/examples/rpmsgsocket/rpsock_client.c
@@ -325,7 +325,7 @@ static int rpsock_stream_client(int argc, char *argv[])
ptr[i] = cnt * 100 + i;
}
- printf("client send data, cnt %d, total len %d, BUFHEAD %s\n",
+ printf("client send data, cnt %d, total len %zu, BUFHEAD %s\n",
cnt, sendsize, outbuf);
tmp = outbuf;
@@ -368,7 +368,7 @@ static int rpsock_stream_client(int argc, char *argv[])
}
else if (act < 0)
{
- printf("client recv data failed %d\n", act);
+ printf("client recv data failed %zd\n", act);
break;
}
@@ -382,8 +382,8 @@ static int rpsock_stream_client(int argc, char *argv[])
if (recvsize >= sendsize)
{
- printf("client recv total %d, send total %d\n",
- recvsize, sendsize);
+ printf("client recv total %zu, send total %zu\n",
+ recvsize, sendsize);
break;
}
}
diff --git a/examples/rpmsgsocket/rpsock_server.c b/examples/rpmsgsocket/rpsock_server.c
index 83bd33d77..66b04e1a8 100644
--- a/examples/rpmsgsocket/rpsock_server.c
+++ b/examples/rpmsgsocket/rpsock_server.c
@@ -102,7 +102,7 @@ static void *rpsock_thread(pthread_addr_t pvarg)
}
else if (ret < 0)
{
- printf("server recv data failed ret %d, errno %d\n", ret, errno);
+ printf("server recv data failed ret %zd, errno %d\n", ret, errno);
break;
}
@@ -147,7 +147,7 @@ static void *rpsock_thread(pthread_addr_t pvarg)
}
}
- printf("server Complete ret %d, errno %d\n", ret, errno);
+ printf("server Complete ret %zd, errno %d\n", ret, errno);
free(args);
return NULL;
}
diff --git a/system/uorb/listener.c b/system/uorb/listener.c
index 71f833a17..b98f78e04 100644
--- a/system/uorb/listener.c
+++ b/system/uorb/listener.c
@@ -675,7 +675,7 @@ static void listener_top(FAR struct list_node *objlist,
uorbinfo_raw("\033[H"); /* move cursor to top left corner */
}
- uorbinfo_raw("\033[K" "current objects: %i", list_length(objlist));
+ uorbinfo_raw("\033[K" "current objects: %zu", list_length(objlist));
uorbinfo_raw("\033[K" "%-*s INST #SUB RATE #Q SIZE",
ORB_MAX_PRINT_NAME - 2, "NAME");