Skip to content

Commit

Permalink
[f2336c116b] Move pragmas to make gcc happy; it is pickier than clang.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkfellows committed Jun 14, 2017
1 parent 9858231 commit 865f11b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unix/tclUnixSock.c
Expand Up @@ -730,6 +730,8 @@ TcpClose2Proc(
*/

#ifndef NEED_FAKE_RFC2553
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
static inline int
IPv6AddressNeedsNumericRendering(
struct in6_addr addr)
Expand All @@ -743,16 +745,14 @@ IPv6AddressNeedsNumericRendering(
* at least some versions of OSX.
*/

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
if (!IN6_IS_ADDR_V4MAPPED(&addr)) {
#pragma GCC diagnostic pop
return 0;
}

return (addr.s6_addr[12] == 0 && addr.s6_addr[13] == 0
&& addr.s6_addr[14] == 0 && addr.s6_addr[15] == 0);
}
#pragma GCC diagnostic pop
#endif /* NEED_FAKE_RFC2553 */

static void
Expand Down

0 comments on commit 865f11b

Please sign in to comment.