summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/netstat/Makefile5
-rw-r--r--usr.bin/netstat/atalk.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index ce5cdab..3f7fe9f 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 ec40e25..dc1de3f 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;
}
OpenPOWER on IntegriCloud