X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C7D3C6.8A17251E@onstor-exch02.onstor.net>; Tue, 31 Jul 2007 15:00:07 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: Coverity issue
Date: Tue, 31 Jul 2007 15:00:07 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E04D2019D@onstor-exch02.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E030E3667@onstor-exch02.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Coverity issue
Thread-Index: AcfTxYZGi1atwtxfT+O2ZlqdHmfqLAAAH7pA
References: <BB375AF679D4A34E9CA8DFA650E2B04E030E3667@onstor-exch02.onstor.net>
From: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
To: "Mike Lee" <mike.lee@onstor.com>,
	"Amit Bothra" <amit.bothra@onstor.com>
Cc: "dl-Software" <dl-software@onstor.com>

Make it void, this is the very old version of gcc way to declare the
equivalent of __attribute__((noreturn)). Declaring function "volatile"
has no affect in the version of the gcc we are using.

>-----Original Message-----
>From: Mike Lee
>Sent: Tuesday, July 31, 2007 3:53 PM
>To: Amit Bothra
>Cc: dl-Software
>Subject: Coverity issue
>
>Hi Amit:
>
>Unfortunately, I was not able to find the details behind the coverity
rule:
>  Event useless_type_qualifier_on_return_type: type qualifier on return
>type is meaningless
>in the manuals I got from coverity training.
>
>However, based on what I googled, I think Coverity is complaining about
>line 23 below, where we typedef'ed noreturn as "volatile void" and then
use
>it as return type for a function.  The use of "volatile" on a function
>return type has no meaning; "volatile" is only meaningful it is applied
to
>a variable type.
>
>22   	#if defined(__GNUC__)
>23   	typedef volatile void noreturn;
>24   	#else
>25   	typedef void noreturn;
>26   	#endif
>
>I believe our choices are:
>a. change definition of noreturn to be line 25 only
>b. change signature of fs_abort() to be of type void
>
>I favor the second option since it is more localized, but I'd respect
>others' opinion.
>
>Thanks.
>-Mike

