Monday, 26 August 2013

Misra rule 19.7 : function like macro

Misra rule 19.7 : function like macro

I have a warning regarding Misra rule 19.7 : A function should be used in
preference to a function-like macro in the below line :
#define gOFFSETOF(type, mem) (gOFFSET)((size_t) ((char *)&((type *)
0)->mem - (char *)((type *) 0)))
how should I solve this ?

No comments:

Post a Comment