diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile index ce5cdab4c2b3..3f7fe9feb4df 100644 --- a/usr.bin/netstat/Makefile +++ b/usr.bin/netstat/Makefile @@ -8,6 +8,11 @@ SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c route.c \ unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c WARNS?= 3 +.if ${CC:T:Mclang} == "clang" +# XXX: Work around a clang false positive with format string warnings +# and ntohs macros (see LLVM PR 11313). +NO_WFORMAT= +.endif CFLAGS+=-fno-strict-aliasing CFLAGS+=-DIPSEC diff --git a/usr.bin/netstat/atalk.c b/usr.bin/netstat/atalk.c index ec40e25b9963..dc1de3fbac60 100644 --- a/usr.bin/netstat/atalk.c +++ b/usr.bin/netstat/atalk.c @@ -81,7 +81,7 @@ static char mybuf[50]; return("*"); } } - sprintf(mybuf,"%hu",(short)ntohs(sat->sat_addr.s_net)); + sprintf(mybuf,"%hu",ntohs(sat->sat_addr.s_net)); return mybuf; }