Can someone explain me PC-Lint error no. 38 with an example...
38 Offset of symbol 'Symbol' inconsistent (Location) -- A
member of a class or struct appears in a different
position (offset from the start of the structure) than an
earlier declaration. This could be caused by array
dimensions changing from one module to another.
I keep getting errors like...
Offset of symbol 'ClassX::access1' inconsistent (conflicts with line 92, file U:\ABC\ABCApp.h, module U:\ABC\ABCApp.cpp)
where access1
is a member variable of type enum ACCESS
declared in ClassX
. And that enum ACCESS
is defined in a different header file access.h
.
access.h
is included in stdafx.h
.
typedef enum
{
ACCESS_NONE = 0,
ACCESS_READ = 1
} ACCESS;
Not sure what is problem here. Where is the inconsistency?