lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 26 Dec 2008 15:39:59 +0100
From:	"Hannes Eder" <hannes@...neseder.net>
To:	"David Miller" <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/27] drivers/net: fix sparse warning: returning void-valued expression

On Fri, Dec 26, 2008 at 1:17 AM, David Miller <davem@...emloft.net> wrote:
> From: Hannes Eder <hannes@...neseder.net>
> Date: Mon, 22 Dec 2008 20:15:17 +0100
>
>> Fix this sparse warning:
>>
>>   drivers/net/niu.c:8850:2: warning: returning void-valued expression
>>
>> Signed-off-by: Hannes Eder <hannes@...neseder.net>
>
> Can we just fix sparse not to generate this warning?  It's
> marginal, at best.  C++ even explicitly defines this as valid
> and last time I brought this up Linus even agreed.
>
> The types match, the function returns void and it is returning a void,
> what is the problem?

after reading the following thread I decided to submit such type of patches:

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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ