• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Pointer not really an lvalue?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Pointer not really an lvalue?
      • From: Rush Manbert <email@hidden>
  • Prev by Date: Re: exited with status (1) error
  • Next by Date: Re: Pointer not really an lvalue?
  • Previous by thread: Re: Resmerger: Can I skip the 'ckid' resources?
  • Next by thread: Re: Pointer not really an lvalue?
  • Index(es):
    • Date
    • Thread