lkml.org 
[lkml]   [2000]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Compiler bug? [was: Re: My bug !]
> Could someone test joy-creative with the other relevant compilers?
> (egcs-2.95, gcc-2.7.2.3)

> --- 2.3/drivers/char/joystick/joy-creative.c Tue Dec 14 18:20:00 1999
> +++ build-2.3/drivers/char/joystick/joy-creative.c Sun Jan 30 23:17:04 2000
> @@ -67,10 +67,11 @@
> int i, j, ret;
>
> for (i = 0; i < 2; i++); {

^ <- problem

> - r[i] = buf[i] = 0;
> + r[i] = 0;
> p[i] = t[i] = JS_CR_MAX_STROBE;
> p[i] += JS_CR_MAX_STROBE;
> }
> + buf[0]=buf[1]=0;


--- joy-creative.c~ Thu Jan 27 18:55:27 2000
+++ joy-creative.c Mon Jan 31 23:05:26 2000
@@ -66,7 +66,7 @@
int r[2], t[2], p[2];
int i, j, ret;

- for (i = 0; i < 2; i++); {
+ for (i = 0; i < 2; i++) {
r[i] = buf[i] = 0;
p[i] = t[i] = JS_CR_MAX_STROBE;
p[i] += JS_CR_MAX_STROBE;

is a better fix IMO.

For a second I was worried though.




-cw

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.042 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site