apps: correct print specifiers to fix compilation warnings

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2023-06-23 00:45:57 +03:00 committed by Xiang Xiao
parent a2f01f5e64
commit c9c4cc13e6
3 changed files with 7 additions and 7 deletions

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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");