Re: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
Re: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
- Subject: Re: MoreCRC - target of assignment not really an lvalue; this will be a hard error in the future
- From: Mike <email@hidden>
- Date: Wed, 16 Jul 2008 13:43:29 -0700
That indeed fixes the warnings. Thanks.
Any ETA on when a new version of MIB will be released on the website?
Thanks,
Mike
Quinn wrote:
At 18:41 -0700 14/7/08, Mike wrote:
Does anyone know how to turn off this error in XCode 2.5 or fix the
code so that it doesn't occur?
I've fixed this in my internal repository. The diffs between the
version on the web and my fixed version are below. The key point is:
#define DO1(buf) crc = gTable[(crc ^ (*((UInt8*)buf)++)) & 0xff] ^ (crc
>> 8)
which casts buf to a (UInt8 *) and then tries to increment it, a
construct that GCC now complains about (as well it should). I've fixed
this by adding a new local variable, buf8, that is a (const UInt8 *),
and changing the macro to:
#define DO1(buf) crc = gTable[(crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
S+E
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden