[PATCH][2.4.28-pre3] RIVA driver gcc-3.4 fix

From: Mikael Pettersson
Date: Sun Sep 12 2004 - 06:52:25 EST


This patch fixes a gcc-3.4 cast-as-lvalue warning in the 2.4.28-pre3
kernel's RIVA video driver. The change is new since the 2.6 code is
different.

/Mikael

--- linux-2.4.28-pre3/drivers/video/riva/accel.c.~1~ 2004-08-08 10:56:31.000000000 +0200
+++ linux-2.4.28-pre3/drivers/video/riva/accel.c 2004-09-12 01:56:20.000000000 +0200
@@ -153,8 +153,10 @@
for (j = 0; j < cnt; j++) {
if (w <= 8)
cdat2 = *cdat++;
- else
- cdat2 = *((u16*)cdat)++;
+ else {
+ cdat2 = *(u16*)cdat;
+ cdat += sizeof(u16);
+ }
fbcon_reverse_order(&cdat2);
d[j] = cdat2;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/