1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Revert r228650, and work around the clang false positive with printf

formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to
the Makefile instead.

MFC after:	1 week
This commit is contained in:
Dimitry Andric 2011-12-17 22:32:00 +00:00
parent be120ddea0
commit d88ccef562
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228668
2 changed files with 6 additions and 1 deletions

View File

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

View File

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