From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 2 21:14:40 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E72E610656EF; Mon, 2 Feb 2009 21:14:40 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id AA8CD8FC08; Mon, 2 Feb 2009 21:14:40 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id D49B97309E; Mon, 2 Feb 2009 22:03:45 +0100 (CET) Date: Mon, 2 Feb 2009 22:03:45 +0100 From: Luigi Rizzo To: Christoph Mallon Message-ID: <20090202210345.GD20288@onelab2.iet.unipi.it> 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-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 21:14:42 -0000 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 the size of the codebase and the age of parts of it (i am pretty sure there is a lot of code 15+ years old which received little if any mainteinance or use in the past decade). (and i have nothing against old code except that compilers, coding practices and the amount of peer review have improved a lot over time, and so -- with some exceptions -- it is easier to prevent some of these issues with more recent code). cheers luigi