don't print warning message if --enable=warning is not specified.
message was of type: (warning) Possible null pointer dereference: previous - otherwise it is redundant to check it against null.
This commit is contained in:
parent
22d97fdbd6
commit
7fdbb91694
|
@ -242,6 +242,10 @@ bool CheckNullPointer::isPointerDeRef(const Token *tok, bool &unknown)
|
|||
|
||||
void CheckNullPointer::nullPointerLinkedList()
|
||||
{
|
||||
|
||||
if (!_settings->isEnabled("warning"))
|
||||
return;
|
||||
|
||||
const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase();
|
||||
|
||||
// looping through items in a linked list in a inner loop.
|
||||
|
|
Loading…
Reference in New Issue