use reportInconclusiveError instead of reportError if checking is inconclusive
This commit is contained in:
parent
12a10a7297
commit
3c509589b5
|
@ -448,7 +448,7 @@ void CheckOther::checkSizeofForStrncmpSize()
|
||||||
|
|
||||||
void CheckOther::sizeofForStrncmpError(const Token *tok)
|
void CheckOther::sizeofForStrncmpError(const Token *tok)
|
||||||
{
|
{
|
||||||
reportError(tok, Severity::warning, "strncmpLen",
|
reportInconclusiveError(tok, Severity::warning, "strncmpLen",
|
||||||
"Passing sizeof(pointer) as the last argument to strncmp.\n"
|
"Passing sizeof(pointer) as the last argument to strncmp.\n"
|
||||||
"Passing a pointer to sizeof returns the size of the pointer, not "
|
"Passing a pointer to sizeof returns the size of the pointer, not "
|
||||||
"the number of characters pointed to by that pointer. This "
|
"the number of characters pointed to by that pointer. This "
|
||||||
|
@ -2222,7 +2222,7 @@ void CheckOther::duplicateBranchError(const Token *tok1, const Token *tok2)
|
||||||
toks.push_back(tok2);
|
toks.push_back(tok2);
|
||||||
toks.push_back(tok1);
|
toks.push_back(tok1);
|
||||||
|
|
||||||
reportError(toks, Severity::style, "duplicateBranch", "Found duplicate branches for if and else.\n"
|
reportInconclusiveError(toks, Severity::style, "duplicateBranch", "Found duplicate branches for if and else.\n"
|
||||||
"Finding the same code for an if branch and an else branch is suspicious and "
|
"Finding the same code for an if branch and an else branch is suspicious and "
|
||||||
"might indicate a cut and paste or logic error. Please examine this code "
|
"might indicate a cut and paste or logic error. Please examine this code "
|
||||||
"carefully to determine if it is correct.");
|
"carefully to determine if it is correct.");
|
||||||
|
|
Loading…
Reference in New Issue