lkml.org 
[lkml]   [2004]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Compile Regression in 2.4.25-pre8][PATCH 37/42]
Il Mon, Feb 02, 2004 at 10:08:48PM +0100, Geert Uytterhoeven ha scritto: 
> On Mon, 2 Feb 2004, Kronos wrote:
> > siimage.c:65: warning: control reaches end of non-void function
> >
> > The last statement before the end is BUG(), but I added a return to
> > silence the warning.
> >
> > diff -Nru -X dontdiff linux-2.4-vanilla/drivers/ide/pci/siimage.c linux-2.4/drivers/ide/pci/siimage.c
> > --- linux-2.4-vanilla/drivers/ide/pci/siimage.c Tue Nov 11 17:51:38 2003
> > +++ linux-2.4/drivers/ide/pci/siimage.c Sat Jan 31 19:07:56 2004
> > @@ -62,6 +62,9 @@
> > return 0;
> > }
> > BUG();
> > +
> > + /* gcc will complain */
> > + return 0;
> > }
>
> What about adding `attribute ((noreturn))' to the declaration of BUG() instead?

BUG() is a macro, it won't work.

Luca
--
Reply-To: kronos@kronoz.cjb.net
Home: http://kronoz.cjb.net
#include <stdio.h>
int main(void) {printf("\t\t\b\b\b\b\b\b");
printf("\t\t\b\b\b\b\b\b");return 0;}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:00    [from the cache]
©2003-2011 Jasper Spaans