Gert Doering has uploaded a new patch set (#3) to the change originally created by Arne Schwabe. ( https://gerrit.openvpn.net/c/openvpn/+/2014?usp=email )
The following approvals got outdated and were removed: Code-Review+2 by Gert Doering Change subject: Fix cppcheck warnings on macOS ...................................................................... Fix cppcheck warnings on macOS - Replace bzero with CLEAR/memset memset is nowadays preferred to bzero - add_route_ipv6: Fix %d used with unsigned int - add const to two variables that can be const Found-By: cppcheck on macOS Change-Id: I10ebb5821829bf738e58fec23f9f9dd65d4626d3 Signed-off-by: Arne Schwabe <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2014 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg40015.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/route.c M src/openvpn/tun.c 2 files changed, 11 insertions(+), 11 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/14/2014/3 diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 8e93404..0b1634c 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -1862,7 +1862,7 @@ #elif defined(TARGET_ANDROID) char out[64]; - snprintf(out, sizeof(out), "%s/%d %s", network, r6->netbits, device); + snprintf(out, sizeof(out), "%s/%u %s", network, r6->netbits, device); status = management_android_control(management, "ROUTE6", out); @@ -3348,10 +3348,10 @@ rtm_addrs = RTA_DST | RTA_NETMASK | RTA_IFP; #endif - bzero(&m_rtmsg, sizeof(m_rtmsg)); - bzero(&so_dst, sizeof(so_dst)); - bzero(&so_mask, sizeof(so_mask)); - bzero(&rtm, sizeof(struct rt_msghdr)); + CLEAR(m_rtmsg); + CLEAR(so_dst); + CLEAR(so_mask); + CLEAR(rtm); rtm.rtm_type = RTM_GET; rtm.rtm_flags = RTF_UP | RTF_GATEWAY; @@ -3566,10 +3566,10 @@ rtm_addrs = RTA_DST | RTA_NETMASK | RTA_IFP; #endif - bzero(&m_rtmsg, sizeof(m_rtmsg)); - bzero(&so_dst, sizeof(so_dst)); - bzero(&so_mask, sizeof(so_mask)); - bzero(&rtm, sizeof(struct rt_msghdr)); + CLEAR(m_rtmsg); + CLEAR(so_dst); + CLEAR(so_mask); + CLEAR(rtm); rtm.rtm_type = RTM_GET; rtm.rtm_flags = RTF_UP; @@ -3654,7 +3654,7 @@ /* get gateway addr and interface name */ if (gate != NULL) { - struct sockaddr_in6 *s6 = (struct sockaddr_in6 *)gate; + const struct sockaddr_in6 *s6 = (struct sockaddr_in6 *)gate; struct in6_addr gw = s6->sin6_addr; #ifndef TARGET_SOLARIS diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index a226fc4..18c1cff 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1833,7 +1833,7 @@ for (int i = 0; i < 256; ++i) { /* some platforms have a dedicated directory per driver */ - char *sep = ""; + const char *sep = ""; #if defined(TARGET_HAIKU) sep = "/"; #endif -- To view, visit https://gerrit.openvpn.net/c/openvpn/+/2014?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I10ebb5821829bf738e58fec23f9f9dd65d4626d3 Gerrit-Change-Number: 2014 Gerrit-PatchSet: 3 Gerrit-Owner: Arne Schwabe <[email protected]> Gerrit-Reviewer: Gert Doering <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
