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:
This commit is contained in:
Phenom 2017-07-15 11:30:08 +02:00 committed by csoler
parent 7b4d3c5a24
commit 0e302e254e

View File

@ -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