From owner-freebsd-current@FreeBSD.ORG Mon Feb 9 18:18:07 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 171C3106566B; Mon, 9 Feb 2009 18:18:07 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4DE1F8FC0A; Mon, 9 Feb 2009 18:18:05 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl89-44.kln.forthnet.gr [77.49.56.44]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n19IHu4X000959 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 9 Feb 2009 20:18:01 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n19IHtpX007413; Mon, 9 Feb 2009 20:17:55 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n19IHs6U007412; Mon, 9 Feb 2009 20:17:54 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Hans Petter Selasky References: <20090206045349.GQ78804@elvis.mu.org> <200902091450.07014.hselasky@c2i.net> <499038DE.3050501@gmx.de> <200902091534.12506.hselasky@c2i.net> Date: Mon, 09 Feb 2009 20:17:54 +0200 In-Reply-To: <200902091534.12506.hselasky@c2i.net> (Hans Petter Selasky's message of "Mon, 9 Feb 2009 15:34:11 +0100") Message-ID: <87ocxbpj8t.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n19IHu4X000959 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.873, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.53, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: usb@freebsd.org, Christoph Mallon , freebsd-current@freebsd.org, Alfred Perlstein Subject: Re: HEADSUP usb2/usb4bsd to become default in GENERIC 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, 09 Feb 2009 18:18:07 -0000 On Mon, 9 Feb 2009 15:34:11 +0100, Hans Petter Selasky wrote: > On Monday 09 February 2009, Christoph Mallon wrote: >> Hans Petter Selasky schrieb: >> > On Monday 09 February 2009, Christoph Mallon wrote: >> >> Christoph Mallon schrieb: >> >>> are named "err" or "error". This should be investigated, so here's the >> >>> complete list: >> >> >> >> Sorry, my MUA seems to have damaged the list. You can get the list here: >> >> http://tron.homeunix.org/usb2.unread.log >> > >> > I think some of these errors depend if you have USB debugging compiled or >> > not. At least GCC does not warn? >> >> No, it does not depend on USB debugging. >> GCC has no warning at all for variables which are only assigned to. >> It only can warn about variables, which are only initialised. >> >> { >> int x = 23; // GCC warns here ... >> int y; // ... but not here - cparser does >> y = 42; >> y++; >> } >> >> cparser has an analysis, which can warn about "y", too. >> >> I manually verified all 40 warnings and I cannot find any users (i.e. >> readers) for these variables. > > What is the correct way to discard the return argument of a function? > That's basically what most of the warnings are about. > > 1) (void)my_fn() cast > 2) if (my_fn()) { } > 3) err = my_fn(); > 4) my_fn(); If you *really* don't care about the returned error code: (void)function(arg1, arg2, ...);