有人可以解释我的PC-Lint错误号。 38用一个例子... 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
int* ptrF();
void f()
{
int* p = ptrF();
bool pOK = p && true;
if (pOK)
*p = 12; // Lint thinks p might be nullptr here
}
lint会给出一个警告 C:\lint_test\nullptr_with_init.cpp(8): I