From 56f0aaa1d4617e8688122dd2d8509f3ee92af4f4 Mon Sep 17 00:00:00 2001 From: yangxin <245051644@qq.com> Date: Wed, 21 Jun 2023 09:28:37 +0000 Subject: [PATCH 1/2] change type of wl_count from int64_t to gsize. Signed-off-by: yangxin <245051644@qq.com> --- qtfs/qtfs_common/user_engine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qtfs/qtfs_common/user_engine.c b/qtfs/qtfs_common/user_engine.c index 8ecbdcb..88caf92 100644 --- a/qtfs/qtfs_common/user_engine.c +++ b/qtfs/qtfs_common/user_engine.c @@ -259,9 +259,9 @@ int qtfs_epoll_init(int fd) return epfd; } -static void qtfs_whitelist_free_items(char **items, int64_t count) +static void qtfs_whitelist_free_items(char **items, gsize count) { - for (int j = 0; j < count; j++) { + for (gsize j = 0; j < count; j++) { if (items[j]) free(items[j]); } @@ -272,7 +272,7 @@ static void qtfs_whitelist_free_items(char **items, int64_t count) static int qtfs_whitelist_transfer(int fd, GKeyFile *config, int type) { - int64_t i, wl_count; + gsize i, wl_count; int ret; char **items; struct qtfs_wl_item head; -- Gitee From 683744838be9a1c5574ed50ba7aac1858ab788c6 Mon Sep 17 00:00:00 2001 From: yangxin <245051644@qq.com> Date: Wed, 21 Jun 2023 09:33:36 +0000 Subject: [PATCH 2/2] change type of pramater of getsockopt from int to socklen_t Signed-off-by: yangxin <245051644@qq.com> --- qtfs/ipc/uds_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtfs/ipc/uds_connector.c b/qtfs/ipc/uds_connector.c index a7b6b43..6aac236 100644 --- a/qtfs/ipc/uds_connector.c +++ b/qtfs/ipc/uds_connector.c @@ -57,7 +57,7 @@ static unsigned short uds_conn_get_sock_type(int sockfd) { unsigned short type; - int len = 2; + socklen_t len = 2; int ret = getsockopt(sockfd, SOL_SOCKET, SO_TYPE, &type, &len); if (ret < 0) { uds_err("get sock type failed, fd:%d", sockfd); -- Gitee