cppcheck sept 18 redux

Henri Verbeet hverbeet at gmail.com
Tue Sep 22 10:14:33 CDT 2009


2009/9/22 Henri Verbeet <hverbeet at gmail.com>:
> "s->pointer" refers to the value of the pointer if "pointer" is a
> pointer, but to the address of the first array element if "pointer" is
> an array. I.e. "&s->pointer[0]" as Nicolas posted.
>
To clarify a bit more, if it's an array the actual array elements are
stored in the structure, so &s->pointer[0] is just the offset of the
field in the array, but if it's a pointer just the address of whatever
the pointer points to is stored in the structure, so you have to
dereference the pointer to the structure to get to it.



More information about the wine-devel mailing list