From 0e302e254ea2b8ebe0caf65c1d351a480f56818b Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 15 Jul 2017 11:30:08 +0200 Subject: [PATCH] Fix warning: this statement may fall through /libretroshare/src/util/rsnet_ss.cc:1031: warning: this statement may fall through [-Wimplicit-fallthrough=] success = inet_ntop( addr.ss_family, (const void *) &(addrv4p- >sin_addr), ipStr, INET_ADDRSTRLEN ); /libretroshare/src/util/rsnet_ss.cc:1033: here case AF_INET6: --- libretroshare/src/util/rsnet_ss.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretroshare/src/util/rsnet_ss.cc b/libretroshare/src/util/rsnet_ss.cc index c50566d06..c11b698da 100644 --- a/libretroshare/src/util/rsnet_ss.cc +++ b/libretroshare/src/util/rsnet_ss.cc @@ -1030,11 +1030,13 @@ bool rs_inet_ntop (const sockaddr_storage &addr, std::string &dst) const struct sockaddr_in * addrv4p = (const struct sockaddr_in *) &addr; success = inet_ntop( addr.ss_family, (const void *) &(addrv4p->sin_addr), ipStr, INET_ADDRSTRLEN ); } + break; case AF_INET6: { const struct sockaddr_in6 * addrv6p = (const struct sockaddr_in6 *) &addr; success = inet_ntop( addr.ss_family, (const void *) &(addrv6p->sin6_addr), ipStr, INET6_ADDRSTRLEN ); } + break; } #endif // WINDOWS_SYS