Gast
#5235713
Hi,
I want to calculate the address difference of var_a compared to base
address of structure.
The solution works fine but I get the following warning:
**"Cast between a pointer to object and an integral type."**
typedef struct
{
volatile int var_a;
volatile int var_b;
} struct_a;
struct_a *pa;
Access:
adrDiff_p = (int)&pa->var_a - (int)pa;
Do you have any better idea?