null pointer: use simplified token list in the 'check and deref' checking
This commit is contained in:
parent
132aa8d0c4
commit
bdd6d6d53d
|
@ -2604,7 +2604,6 @@ void CheckOther::nullPointer()
|
|||
nullPointerLinkedList();
|
||||
nullPointerStructByDeRefAndChec();
|
||||
nullPointerByDeRefAndChec();
|
||||
nullPointerByCheckAndDeRef();
|
||||
}
|
||||
|
||||
/** Derefencing null constant (simplified token list) */
|
||||
|
|
|
@ -91,7 +91,7 @@ public:
|
|||
checkOther.checkMisusedScopedObject();
|
||||
|
||||
// FIXME: I get a deadlock if I uncomment this:
|
||||
//nullPointerByCheckAndDeRef();
|
||||
checkOther.nullPointerByCheckAndDeRef();
|
||||
}
|
||||
|
||||
|
||||
|
@ -147,6 +147,12 @@ public:
|
|||
/** @brief possible null pointer dereference */
|
||||
void nullPointer();
|
||||
|
||||
/**
|
||||
* @brief Does one part of the check for nullPointer().
|
||||
* Checking if pointer is NULL and then dereferencing it..
|
||||
*/
|
||||
void nullPointerByCheckAndDeRef();
|
||||
|
||||
/** @brief dereferencing null constant (after Tokenizer::simplifyKnownVariables) */
|
||||
void nullConstantDereference();
|
||||
|
||||
|
@ -327,12 +333,6 @@ private:
|
|||
*/
|
||||
void nullPointerByDeRefAndChec();
|
||||
|
||||
/**
|
||||
* @brief Does one part of the check for nullPointer().
|
||||
* Checking if pointer is NULL and then dereferencing it..
|
||||
*/
|
||||
void nullPointerByCheckAndDeRef();
|
||||
|
||||
/**
|
||||
* @brief Does one part of the check for nullPointer().
|
||||
* -# initialize pointer to 0
|
||||
|
|
|
@ -613,6 +613,9 @@ private:
|
|||
tokenizer.simplifyTokenList();
|
||||
checkOther.nullConstantDereference();
|
||||
checkOther.executionPaths();
|
||||
|
||||
tokenizer.simplifyTokenList();
|
||||
checkOther.nullPointerByCheckAndDeRef();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue