Pointer not really an lvalue?
Pointer not really an lvalue?
- Subject: Pointer not really an lvalue?
- From: "Mark Wagner" <email@hidden>
- Date: Thu, 13 Jul 2006 10:19:01 -0700
Under GCC 4, the following code gives a warning "target of assignment
not really an lvalue; this will be a hard error in the future". As
far as I can tell, it's just casting a void * to a char * and
performing pointer arithmetic on it. What's the error and how do I
fix it?
typedef struct SBlockInfo
{
void* blockPtr; // points to header of block
ASize dataOffset; // offset from header to data
ASize blockSize; // actual size of block without header
ASize usedSize; // actual used size of block
unsigned long bits;
} SBlockInfo, *SBlockInfoPtr;
SBlockInfoPtr block
((char *)(block->blockPtr)) += mChunkSize; // <--- Warning here
Thanks,
Mark Wagner
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden