| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Mon, 31 Oct 2005, Mark Dawson <email@hidden> wrote:I'm taking on some older code, and I'm getting this warning: "warning: target
of assignment not really an lvalue; this will be a hard error in the future"
for the following line:
*((uint32_t*)dst)++ = *((uint32_t*)src)++;
Why is this code going to be an error in the future?
Just use:
*(uint32_t*)dst++ = *(uint32_t*)src++;
The typecasting has president over the post-increment operator. It will "do the right thing". (And not cause the warning ;-).
_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden
| References: | |
| >Re: Xcode-users Digest, Vol 2, Issue 621 (From: George Warner <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.