From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Jeff Garzik <jeff@garzik.org>
Cc: Morten Welinder <terra@gnome.org>, linux-sparse@vger.kernel.org
Subject: Re: [PATCH] sparse: gcc 4.1 warnings
Date: Tue, 11 Apr 2006 10:56:02 +0200 [thread overview]
Message-ID: <20060411085602.GA11643@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <443AF8A4.2090007@garzik.org>
On Mon, 10 April 2006 20:30:28 -0400, Jeff Garzik wrote:
> Morten Welinder wrote:
> >This doesn't look quite right.
> >
> >So it looks like gcc 4.1 complains over non-used values that are the
> >result of a cast. That feels obnoxious, but in this case maybe you
>
> Yes, it is :) See below for vanilla sparse build under gcc 4.1...
>
>
> >could try just casting to void in add_ptr_list -- is the value ever
> >used?
>
> All uses except for add_pseudo() ignore the return value.
How about making this two functions instead? Something like
void add_ptr_list(...)
{
(void) __add_ptr_list(...);
}
And use the __add_ptr_list version in add_pseudo().
Hmm. Except that this is userspace and double underscores are not
allowed. Maybe do_add_ptr_list(...) then?
And yes, this is really obnoxious. I have read code before that
constantly does
(void) this(...);
(void) that(...);
and didn't like it much. Ignoring the issue and fixing the code
checker instead might be a better idea.
Jörn
--
More computing sins are committed in the name of efficiency (without
necessarily achieving it) than for any other single reason - including
blind stupidity.
-- W. A. Wulf
next prev parent reply other threads:[~2006-04-11 8:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-08 4:14 [PATCH] sparse: gcc 4.1 warnings Jeff Garzik
2006-04-10 13:21 ` Morten Welinder
2006-04-11 0:30 ` Jeff Garzik
2006-04-11 8:56 ` Jörn Engel [this message]
2006-04-11 9:10 ` Chris Wedgwood
2006-04-11 9:19 ` Jörn Engel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060411085602.GA11643@wohnheim.fh-wedel.de \
--to=joern@wohnheim.fh-wedel.de \
--cc=jeff@garzik.org \
--cc=linux-sparse@vger.kernel.org \
--cc=terra@gnome.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox