I am seeing the following lint warning with this which I think is caused by the offsetof().
Is there anything that can be done to overcome this in the code (other than adding a lint comment that is).
getRg(offsetof(LAPI_RS, medPrm)) )
svcPrm.cpp 33 Warning 413: Likely use of null pointer 'unknown-name' in left argument to operator '->' [Reference: file svcPrm.cpp: line 33]
Where LAPI_RS is a struct and medPrm a member in it.
Any ideas would be greatly appreciated.
The 'offsetof()' thing make uses of null pointer expressions (and pretty on purpose).
Now, i see nothing that could prevent you of using any kind of symbol instead of NULL (e.g. &((_struct*)main)->_field could do the trick as well), provided that you find a suitable symbol (void* most preferably to avoid type casting warnings)...