Tue Aug 16 10:34:23 2011 UTC ()
avoid/document non-literal format strings


(christos)
diff -r1.2 -r1.3 src/external/bsd/libpcap/dist/optimize.c
diff -r1.4 -r1.5 src/external/bsd/libpcap/lib/Makefile

cvs diff -r1.2 -r1.3 src/external/bsd/libpcap/dist/optimize.c (expand / switch to unified diff)

--- src/external/bsd/libpcap/dist/optimize.c 2010/12/05 01:45:46 1.2
+++ src/external/bsd/libpcap/dist/optimize.c 2011/08/16 10:34:22 1.3
@@ -2143,27 +2143,27 @@ convert_code_r(p) @@ -2143,27 +2143,27 @@ convert_code_r(p)
2143 if (src->s.jt || src->s.jf) { 2143 if (src->s.jt || src->s.jf) {
2144 bpf_error("illegal jmp destination"); 2144 bpf_error("illegal jmp destination");
2145 /*NOTREACHED*/ 2145 /*NOTREACHED*/
2146 } 2146 }
2147#endif 2147#endif
2148 goto filled; 2148 goto filled;
2149 } 2149 }
2150 if (off == slen - 2) /*???*/ 2150 if (off == slen - 2) /*???*/
2151 goto filled; 2151 goto filled;
2152 2152
2153 { 2153 {
2154 u_int i; 2154 u_int i;
2155 int jt, jf; 2155 int jt, jf;
2156 const char *ljerr = "%s for block-local relative jump: off=%d"; 2156#define ljerr "%s for block-local relative jump: off=%d"
2157 2157
2158#if 0 2158#if 0
2159 printf("code=%x off=%d %x %x\n", src->s.code, 2159 printf("code=%x off=%d %x %x\n", src->s.code,
2160 off, src->s.jt, src->s.jf); 2160 off, src->s.jt, src->s.jf);
2161#endif 2161#endif
2162 2162
2163 if (!src->s.jt || !src->s.jf) { 2163 if (!src->s.jt || !src->s.jf) {
2164 bpf_error(ljerr, "no jmp destination", off); 2164 bpf_error(ljerr, "no jmp destination", off);
2165 /*NOTREACHED*/ 2165 /*NOTREACHED*/
2166 } 2166 }
2167 2167
2168 jt = jf = 0; 2168 jt = jf = 0;
2169 for (i = 0; i < slen; i++) { 2169 for (i = 0; i < slen; i++) {

cvs diff -r1.4 -r1.5 src/external/bsd/libpcap/lib/Makefile (expand / switch to unified diff)

--- src/external/bsd/libpcap/lib/Makefile 2011/07/19 03:07:09 1.4
+++ src/external/bsd/libpcap/lib/Makefile 2011/08/16 10:34:23 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.4 2011/07/19 03:07:09 dholland Exp $  1# $NetBSD: Makefile,v 1.5 2011/08/16 10:34:23 christos Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
5USE_FORT?= yes # network protocol library 5USE_FORT?= yes # network protocol library
6 6
7CWARNFLAGS.clang+= -Wno-format-extra-args \ 7CWARNFLAGS.clang+= -Wno-format-extra-args \
8 -Wno-unneeded-internal-declaration 8 -Wno-unneeded-internal-declaration
9 9
10.SUFFIXES: .3 .3pcap 10.SUFFIXES: .3 .3pcap
11 11
12__sed: .USE 12__sed: .USE
13 @rm -f ${.TARGET} 13 @rm -f ${.TARGET}
14 ${TOOL_SED} -e 's,@MAN_FILE_FORMATS@,5,g' \ 14 ${TOOL_SED} -e 's,@MAN_FILE_FORMATS@,5,g' \
@@ -90,15 +90,16 @@ SRCS= scanner.l savefile.c pcap.c pcap-b @@ -90,15 +90,16 @@ SRCS= scanner.l savefile.c pcap.c pcap-b
90 90
91.PATH: ${NETBSDSRCDIR}/sys/net 91.PATH: ${NETBSDSRCDIR}/sys/net
92SRCS+= bpf_filter.c 92SRCS+= bpf_filter.c
93 93
94INCS= pcap-namedb.h pcap.h pcap/pcap.h pcap/namedb.h pcap/bpf.h 94INCS= pcap-namedb.h pcap.h pcap/pcap.h pcap/namedb.h pcap/bpf.h
95INCSDIR= /usr/include 95INCSDIR= /usr/include
96 96
97scanner.d scanner.o: tokdefs.h 97scanner.d scanner.o: tokdefs.h
98 98
99tokdefs.h: grammar.h 99tokdefs.h: grammar.h
100 cp $? $@ 100 cp $? $@
101 101
102CLEANFILES+= tokdefs.h 102CLEANFILES+= tokdefs.h
 103COPTS.bpf_image.c = -Wno-format-nonliteral
103 104
104.include <bsd.lib.mk> 105.include <bsd.lib.mk>