fix if's that are followed by semicolons
Erik de Castro Lopo
erikd+wine at mega-nerd.com
Tue Sep 20 03:31:30 CDT 2005
Mike McCormack wrote:
>
> Andreas Mohr wrote:
>
> > Could you perhaps create a first version of a shell script tools/find_gotchas ?
>
> I have other things to do at the moment, so go ahead if you're feeling
> motivated. I suspect you'll run into alot of false positives. There
> might be a compiler switch to turn on warnings for these things too (ie.
> statements with no effect).
Gcc-4.0 catches this:
erikd at miles > cat test.c
int main (void)
{
if (0) ;
return 0 ;
}
erikd at miles > gcc-4.0 -W -Wall test.c -o /dev/null
test.c: In function 'main':
test.c:3: warning: empty body in an if-statement
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"It is capitalist America that produced the modern independent woman.
Never in history have women had more freedom of choice in regard to
dress, behavior, career, and sexual orientation."
-- Camille Paglia
More information about the wine-devel
mailing list