Date: Tue, 3 Feb 2009 17:11:56 -0600 From: Christian Peron <csjp@freebsd.org> To: Christoph Mallon <christoph.mallon@gmx.de> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: write-only variables in src/sys/ - possible bugs Message-ID: <20090203231155.GA69101@jnz.sqrt.ca> In-Reply-To: <49874CA8.5090605@gmx.de> References: <49874CA8.5090605@gmx.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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 an mbuf chain to the current kernel buffer. */ void bpf_buffer_append_mbuf(struct bpf_d *d, caddr_t buf, u_int offset, void *src, u_int len) { const struct mbuf *m; u_char *dst; u_int count; m = (struct mbuf *)src; dst = (u_char *)buf + offset; while (len > 0) { if (m == NULL) panic("bpf_mcopy"); count = min(m->m_len, len); bcopy(mtod(m, void *), dst, count); m = m->m_next; [..] Does it not consider being passed as an argument to a function as being read? Cheers
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090203231155.GA69101>