Warning with offsetof macro?
Warning with offsetof macro?
- Subject: Warning with offsetof macro?
- From: "Mark Wagner" <email@hidden>
- Date: Wed, 14 Jun 2006 12:19:13 -0700
How do I get rid of this warning?
../NEO/NeoIncludes/CNeoIOBlock.h:85: warning: invalid access to
non-static data member `CNeoIOBlock::fPB' of NULL object
../NEO/NeoIncludes/CNeoIOBlock.h:85: warning: (perhaps the `offsetof'
macro was used incorrectly)
The line of code in question is
static CNeoIOBlock *GetIOBlock(NeoIOParams *aIOParams) {return
(CNeoIOBlock *)((char *)aIOParams - offsetof(CNeoIOBlock, fPB));}
which appears to be a function that takes a pointer to an object
member, and returns a pointer to the object.
--
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