From owner-freebsd-current@FreeBSD.ORG Tue Feb 3 23:32:44 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 174371065670; Tue, 3 Feb 2009 23:32:44 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from mx-01queue01.mts.net (mx-01queue01.mts.net [142.161.3.10]) by mx1.freebsd.org (Postfix) with ESMTP id A6E968FC0A; Tue, 3 Feb 2009 23:32:43 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from wnpgmb013qw-sp03.mts.net ([10.205.128.23]) by mx-01mtaout02.mts.net with ESMTP id <20090203231156.LDNN12442.mx-01mtaout02.mts.net@wnpgmb013qw-sp03.mts.net>; Tue, 3 Feb 2009 17:11:56 -0600 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuQEAE1eiEmOoTqg/2dsb2JhbACBbs4RhBQG X-IronPort-AV: E=Sophos;i="4.37,374,1231135200"; d="scan'208";a="59404060" Received: from wnpgmb1309w-ad05-58-160.dynamic.mts.net (HELO jnz.my.domain) ([142.161.58.160]) by wnpgmb013qw-sp03.mts.net with ESMTP; 03 Feb 2009 17:11:56 -0600 Received: from jnz.my.domain (localhost [127.0.0.1]) by jnz.my.domain (8.14.3/8.14.2) with ESMTP id n13NButW069171; Tue, 3 Feb 2009 17:11:56 -0600 (CST) (envelope-from csjp@jnz.my.domain) Received: (from csjp@localhost) by jnz.my.domain (8.14.3/8.14.2/Submit) id n13NBuli069170; Tue, 3 Feb 2009 17:11:56 -0600 (CST) (envelope-from csjp) Date: Tue, 3 Feb 2009 17:11:56 -0600 From: Christian Peron To: Christoph Mallon Message-ID: <20090203231155.GA69101@jnz.sqrt.ca> References: <49874CA8.5090605@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49874CA8.5090605@gmx.de> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Hackers , FreeBSD Current Subject: Re: write-only variables in src/sys/ - possible bugs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 23:32:44 -0000 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