diff options
| author | wangmenglan <[email protected]> | 2023-02-28 21:42:52 +0800 |
|---|---|---|
| committer | wangmenglan <[email protected]> | 2023-03-01 05:55:59 +0800 |
| commit | 3401fcb403b54f238f6e3a376718dc27dc3c1308 (patch) | |
| tree | 5e4db12f395012d8b2200696827fe207c97f145c | |
| parent | 2b75a01146165ac28d7941187255e8818cfeb031 (diff) | |
消除centos7编译告警v1.0.01-20230301
| -rw-r--r-- | common/src/bfd.cpp | 12 | ||||
| -rw-r--r-- | platform/src/health_check.cpp | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/common/src/bfd.cpp b/common/src/bfd.cpp index 3bfe13c..d1112e8 100644 --- a/common/src/bfd.cpp +++ b/common/src/bfd.cpp @@ -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))]; struct cmsghdr align; } u; - struct msghdr mh = { - .msg_iov = iov, - .msg_iovlen = 1, - .msg_control = u.buf, - .msg_controllen = sizeof(u.buf), - }; + struct msghdr mh; + memset(&mh, 0, sizeof(mh)); + mh.msg_iov = iov; + mh.msg_iovlen = 1; + mh.msg_control = u.buf; + mh.msg_controllen = sizeof(u.buf); struct cmsghdr *cmh = CMSG_FIRSTHDR(&mh); ssize_t ret; diff --git a/platform/src/health_check.cpp b/platform/src/health_check.cpp index 8e9bfa8..eb4ae40 100644 --- a/platform/src/health_check.cpp +++ b/platform/src/health_check.cpp @@ -342,6 +342,7 @@ static void *_health_check_session_foreach(void *arg) } } bfd_vtysh_close(&client); + return NULL; } static int health_check_session_foreach() |
