Garrett Cooper <[email protected]> writes:
> Seeing that you've committed quite a bit to kdump recently, could
> you please take a look at
> http://www.freebsd.org/cgi/query-pr.cgi?pr=161478 ?

Hmm, did you run across this while testing your patch?

% make
cc -O2 -pipe  -I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump 
-I/usr/src/usr.bin/kdump/../.. -I. -g -std=gnu99 -fstack-protector 
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter 
-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type 
-Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align 
-Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls 
-Wold-style-definition -Wno-pointer-sign -c ioctl.c
cc1: warnings being treated as errors
In file included from ioctl.c:80:
/usr/include/netinet/ip_fil.h:1284: warning: redundant redeclaration of 
'bcopywrap'
/usr/include/netinet/ip_compat.h:1543: warning: previous declaration of 
'bcopywrap' was here
*** Error code 1

Stop in /usr/src/usr.bin/kdump.

I don't understand why it complains, since both declarations are
identical, modulo whitespace:

% grep -r bcopywrap /usr/include/netinet
/usr/include/netinet/ip_fil.h:extern         int  bcopywrap __P((void *, void 
*, size_t));
/usr/include/netinet/ip_compat.h:# define    COPYIN(a,b,c)  bcopywrap((a), (b), 
(c))
/usr/include/netinet/ip_compat.h:# define    COPYOUT(a,b,c) bcopywrap((a), (b), 
(c))
/usr/include/netinet/ip_compat.h:extern      int            bcopywrap __P((void 
*, void *, size_t));
% make DEBUG_FLAGS="-g -save-temps"
[...]
% grep bcopywrap /usr/obj/usr/src/usr.bin/kdump/ioctl.i
extern int bcopywrap (void *, void *, size_t);
extern int bcopywrap (void *, void *, size_t);

BTW, the extern keyword is completely pointless, since it is implicit
for functions.

DES
-- 
Dag-Erling Smørgrav - [email protected]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to