Re: Kernel bugs found using inspect tool

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Wed Feb 23 2000 - 10:38:18 EST


Ricky Beam wrote:
> Oh, this is funny!
>
> (yes, I reorderd them)
> ...
> >drivers/scsi/53c7,8xx.c: extra semicolon near line 3152
> > for (bp = (struct NCR53c7x0_break *) host->breakpoints;
>
> Full context:
> for (bp = (struct NCR53c7x0_break *) host->breakpoints;
> bp; bp = (struct NCR53c7x0_break *) bp->next); {
>
> >drivers/char/joystick/joy-creative.c: extra semicolon near line 69
> > for (i = 0; i < 2; i++); {
>
> *grin* Those two are just classic! It's been 6 years since I've seen such
> beautiful snafu's. (I used to teach FORTRAN labs.)

Those are obvious GCC warning material. for/while/if followed by
semicolon followed by brace.

Hmm. When GCC supports column numbers, maybe warnings could be added
ased on indentation clues too, like this which I've seen in the kernel
on occasion:

    if (foo);
         bar;

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:33 EST