Re: write-only variables in src/sys/ - possible bugs

2009-02-04 Thread Christoph Mallon
Christian Peron schrieb: I started following up on this and ran into an issue for these: sys/net/bpf_buffer.c:133: warning: variable 'dst' is never read sys/net/bpf_buffer.c:134: warning: variable 'count' is never read sys/net/bpf_buffer.c:142: warning: variable 'dst' is never read /* *

Re: write-only variables in src/sys/ - possible bugs

2009-02-04 Thread Christian Peron
On Wed, Feb 04, 2009 at 03:54:41PM +0100, Christoph Mallon wrote: [..] Yes, function arguments are considered being read. The problem is different here: mtod() should be a macro, but the macro declaration was missing (*cough* hacked build process *cough*). So the parser tried to parse

Re: write-only variables in src/sys/ - possible bugs

2009-02-04 Thread Christoph Mallon
Christian Peron schrieb: On Wed, Feb 04, 2009 at 03:54:41PM +0100, Christoph Mallon wrote: [..] Yes, function arguments are considered being read. The problem is different here: mtod() should be a macro, but the macro declaration was missing (*cough* hacked build process *cough*). So the

Re: write-only variables in src/sys/ - possible bugs

2009-02-03 Thread Christian Peron
I started following up on this and ran into an issue for these: sys/net/bpf_buffer.c:133: warning: variable 'dst' is never read sys/net/bpf_buffer.c:134: warning: variable 'count' is never read sys/net/bpf_buffer.c:142: warning: variable 'dst' is never read /* * Scatter-gather data copy from

write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Christoph Mallon
Hi, I compiled a list of all local variables in src/sys/ (r188000), which are only written to, but never read. This is more than the GCC warning, which only complains about variables, which are only declared (and maybe initialised) and not used otherwise. In contrast this list contains

Re: write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Christoph Mallon
Andrew Thompson schrieb: This is helpful, my only nit would be to run it through sort. :) Fixed (: ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to

Re: write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Andrew Thompson
On Mon, Feb 02, 2009 at 08:42:32PM +0100, Christoph Mallon wrote: Hi, I compiled a list of all local variables in src/sys/ (r188000), which are only written to, but never read. This is more than the GCC warning, which only complains about variables, which are only declared (and maybe

Re: write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Max Laier
On Monday 02 February 2009 20:42:32 Christoph Mallon wrote: Hi, I compiled a list of all local variables in src/sys/ (r188000), which are only written to, but never read. This is more than the GCC warning, which only complains about variables, which are only declared (and maybe initialised)

Re: write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Christoph Mallon
Max Laier schrieb: On Monday 02 February 2009 20:42:32 Christoph Mallon wrote: A small disclaimer: There might be some false positives due to errors which are caused by HEAD sources in combination with my installed 7.x headers plus a hacked up build process. Also some warnings are the result

Re: write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Luigi Rizzo
On Mon, Feb 02, 2009 at 08:42:32PM +0100, Christoph Mallon wrote: Hi, I compiled a list of all local variables in src/sys/ (r188000), which are only written to, but never read. This is more than the GCC warning, interesting list, thanks. Also, 700 entries is not a bad result considering

Re: write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Maksim Yevmenkin
On Mon, Feb 2, 2009 at 11:42 AM, Christoph Mallon christoph.mal...@gmx.de wrote: Hi, I compiled a list of all local variables in src/sys/ (r188000), which are only written to, but never read. This is more than the GCC warning, which only complains about variables, which are only declared (and

Re: write-only variables in src/sys/ - possible bugs

2009-02-02 Thread Poul-Henning Kamp
In message 49874ca8.5090...@gmx.de, Christoph Mallon writes: I compiled a list of all local variables in src/sys/ (r188000), which are only written to, but never read. Bravo! -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD