消除centos7编译告警

This commit is contained in:
wangmenglan
2023-02-28 21:42:52 +08:00
parent 2b75a01146
commit 3401fcb403
2 changed files with 7 additions and 6 deletions

View File

@@ -113,12 +113,12 @@ static ssize_t bfd_vtysh_client_receive(struct bfd_vtysh_client *client, char *b
uint8_t buf[CMSG_SPACE(sizeof(int))]; uint8_t buf[CMSG_SPACE(sizeof(int))];
struct cmsghdr align; struct cmsghdr align;
} u; } u;
struct msghdr mh = { struct msghdr mh;
.msg_iov = iov, memset(&mh, 0, sizeof(mh));
.msg_iovlen = 1, mh.msg_iov = iov;
.msg_control = u.buf, mh.msg_iovlen = 1;
.msg_controllen = sizeof(u.buf), mh.msg_control = u.buf;
}; mh.msg_controllen = sizeof(u.buf);
struct cmsghdr *cmh = CMSG_FIRSTHDR(&mh); struct cmsghdr *cmh = CMSG_FIRSTHDR(&mh);
ssize_t ret; ssize_t ret;

View File

@@ -342,6 +342,7 @@ static void *_health_check_session_foreach(void *arg)
} }
} }
bfd_vtysh_close(&client); bfd_vtysh_close(&client);
return NULL;
} }
static int health_check_session_foreach() static int health_check_session_foreach()