
Hi Wolfgang,
Attached is a patch I did last night (2005-10-12) to fix two places where gcc 4.0 refused to compile due to the lvalue constructs no longer being supported. The patches compile, I have not executed the resulting code: please double-check for correctness.
fs/jffs2/compr_rubin.c | 3 ++- net/net.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
---- Changelog ----
Clean up lvalue issues for gcc 4.0 Patch by Jerry Van Baren, 12 October 2005
Signed-off-by: Jerry Van Baren gerald.vanbaren@smiths-aerospace.com
----
Best regards, gvb
Clean up lvalue issues for gcc 4.0 Patch by Jerry Van Baren, 12 October 2005
--- commit b62be760bf00fe3564dec9ab6da7c8503b1420aa tree 6859adbc0d2ef302dcc4b4a3d5dc7490593235fa parent 3df5bea0b0bddc196bf952c51d1dd54d966b82ba author Jerry Van Baren vanbaren@dellserver.lan Wed, 12 Oct 2005 21:52:39 -0400 committer Jerry Van Baren vanbaren@dellserver.lan Wed, 12 Oct 2005 21:52:39 -0400
fs/jffs2/compr_rubin.c | 3 ++- net/net.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index cf01f88..c1c28f3 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -86,7 +86,8 @@ void rubin_do_decompress(unsigned char * rec_q |= (temp >> (bit++ ^ 7)) & 1; if (bit > 31) { bit = 0; - temp = *(++((u32 *) in)); + in += sizeof(u32); + temp = *(u32 *)in; } } i0 = (bits[i] * p) >> 8; diff --git a/net/net.c b/net/net.c index 11b7700..ce2c9a6 100644 --- a/net/net.c +++ b/net/net.c @@ -819,7 +819,8 @@ static ushort CDP_compute_csum(const uch buff++; } while (len > 1) { - result += *((const ushort *)buff)++; + result += *(const ushort *)buff; + buff += sizeof(ushort); if (result & 0x80000000) result = (result & 0xFFFF) + (result >> 16); len -= 2;