Skip to content

Commit 38680e3

Browse files
committed
Fixed cppcheck-opensource#4677 (Message for 'possible null pointer dereference, otherwise it is redundant to check..' is warning but says error)
1 parent ecfe4eb commit 38680e3

2 files changed

Lines changed: 53 additions & 53 deletions

File tree

‎lib/checknullpointer.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ void CheckNullPointer::nullPointerError(const Token *tok, const std::string &var
15091509
callstack.push_back(tok);
15101510
callstack.push_back(nullCheck);
15111511
const std::string errmsg("Possible null pointer dereference: " + varname + " - otherwise it is redundant to check it against null.");
1512-
reportError(callstack, Severity::error, "nullPointer", errmsg, inconclusive);
1512+
reportError(callstack, Severity::warning, "nullPointer", errmsg, inconclusive);
15131513
}
15141514

15151515
void CheckNullPointer::nullPointerDefaultArgError(const Token *tok, const std::string &varname)

0 commit comments

Comments
 (0)