mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hannes Eder" <hannes@hanneseder.net>
To: "David Howells" <dhowells@redhat.com>
Cc: "James Morris" <jmorris@namei.org>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] CRED: fix sparse warnings
Date: Tue, 25 Nov 2008 01:46:10 +0100	[thread overview]
Message-ID: <154e089b0811241646y6ada2c97l5e45284969729e29@mail.gmail.com> (raw)
In-Reply-To: <5008.1227568869@redhat.com>

On Tue, Nov 25, 2008 at 12:21 AM, David Howells <dhowells@redhat.com> wrote:
> Hannes Eder <hannes@hanneseder.net> wrote:
>
>>   security/security.c:228:2: warning: returning void-valued expression
>>   security/security.c:233:2: warning: returning void-valued expression
>>   security/security.c:616:2: warning: returning void-valued expression
>
> What's wrong with that?

In my opinion the following quotes give good argument:

> On Thu, 2008-05-01 at 13:00 +0100, Al Viro wrote:
[snip|
> > 3.  6.8.6.4(1): A return statement with an expression shall not appear in
> > a function whose return type is void.
> >
> > Write in C, please.

see http://lkml.org/lkml/2008/5/1/88

On Thu, 1 May 2008 at 13:53:39 +0100, Al Viro wrote:
> On Thu, May 01, 2008 at 03:42:14PM +0300, Boaz Harrosh wrote:
> > > 3.  6.8.6.4(1): A return statement with an expression shall not appear in
> > > a function whose return type is void.
> > >
> >
> > Please forgive my ignorance, where is this quote from?
>
> C99.  I don't have C90 in front of me, so I can't give you exact quote from
> there, but it's been explicitly banned in C90 as well.

see http://lkml.org/lkml/2008/5/1/112

There have been a couple of such patches, see

http://www.google.at/search?q=site:lkml.org+%22warning:+returning+void-valued+expression%22

Furthermore in the next-tree from today and 'defconfig' are only 5 of
such warnings left, 3 of them would be resolved with this patch.

Hannes

  reply	other threads:[~2008-11-25  0:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 21:14 Hannes Eder
2008-11-24 23:21 ` David Howells
2008-11-25  0:46   ` Hannes Eder [this message]
2008-11-25  0:56     ` Harvey Harrison
2008-11-25  6:39       ` Julia Lawall
2008-11-25  1:08 ` James Morris

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=154e089b0811241646y6ada2c97l5e45284969729e29@mail.gmail.com \
    --to=hannes@hanneseder.net \
    --cc=dhowells@redhat.com \
    --cc=jmorris@namei.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®