From owner-freebsd-current@FreeBSD.ORG Mon Feb 2 20:56:50 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 65E2D1065A82 for ; Mon, 2 Feb 2009 20:56:50 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 204CC8FC1E for ; Mon, 2 Feb 2009 20:56:48 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 02 Feb 2009 20:56:43 -0000 Received: from p54A3EDDF.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.237.223] by mail.gmx.net (mp066) with SMTP; 02 Feb 2009 21:56:43 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX18oqM9MprkoeDaH7ZpMx4sTEKd4iF2phjGj64N73/ YSGng17F6YWW8t Message-ID: <49875E0A.5070209@gmx.de> Date: Mon, 02 Feb 2009 21:56:42 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Max Laier References: <49874CA8.5090605@gmx.de> <200902022147.22862.max@love2party.net> In-Reply-To: <200902022147.22862.max@love2party.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 Cc: freebsd-hackers@freebsd.org, 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: Mon, 02 Feb 2009 20:56:56 -0000 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 from variables, which are only used in debug macros, so td = >> curthread; KASSERT(td != NULL); provokes a warning (I consider this bad >> style). Nonetheless the number of false positives should be low. If >> there is interest, then I can compile a "proper" list. > > Are you interested in false positive reports? If so, I think > sys/contrib/pf/net/pf.c:2931 is one. Seems cparser is confused by the union > in struct assignment, maybe? Or it suffers from the similar issue with > switch/case-statements as gcc. saddr is read from in all but the default > case. When neither INET nor INET6 is set, daddr and saddr are only written to. So this part should be enclosed in #if defined INET || defined INET6. Probably this file is not compiled at all, when neither INET nor INET6 are set, so this is certainly the result of the "hacked up build process"-part, sorry.