svn commit: r226157 - head/usr.bin/kdump

Garrett Cooper yanegomi at gmail.com
Tue Oct 11 23:13:38 UTC 2011


2011/10/11 Dag-Erling Smørgrav <des at des.no>:
> Garrett Cooper <yanegomi at gmail.com> 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.

I didn't run into that particular issue, but then again.. it looks
like it hasn't been generating my files properly (which seems like a
Makefile bug because all of the generated files should be cleaned with
make clean).
-Garrett


More information about the svn-src-all mailing list