Re: [PATCH][2.4.28-pre3] USB drivers gcc-3.4 fixes

From: Pete Zaitcev
Date: Sun Sep 12 2004 - 19:32:46 EST


On Sun, 12 Sep 2004 13:29:05 +0200 (MEST)
Mikael Pettersson <mikpe@xxxxxxxxx> wrote:

> This patch fixes gcc-3.4 cast-as-lvalue warnings in the 2.4.28-pre3
> kernel's USB drivers. The audio.c and uss720.c changes are backports
> from the 2.6 kernel. The hpusbscsi.c and microtek.c changes are new,
> since the 2.6 code is different.

> +++ linux-2.4.28-pre3/drivers/usb/audio.c 2004-09-12 01:56:20.000000000 +0200
> @@ -609,7 +609,7 @@
> size -= pgrem;
> - (char *)buffer += pgrem;
> + buffer += pgrem;

I'm pretty sure it's done that way on purpose. There were compilers which
did not allow any arithmetics on void*, and it had to be cast to char*.
So perhaps it's correct for 2.6, which requires gcc 3 anyway, but I have
my doubts about applicability of this to 2.4.

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