Fix crash in addons/test/test-misra.py (#2652)

This commit is contained in:
Ken-Patrick Lehrmann 2020-05-20 16:02:13 +02:00 committed by GitHub
parent 79d3f488da
commit a96a879b6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -13,7 +13,7 @@ def find_cppcheck_binary():
if os.path.exists(location):
break
else:
raise RuntimeError("Could not fine cppcheck binary")
raise RuntimeError("Could not find cppcheck binary")
return location

View File

@ -3457,6 +3457,8 @@ static bool isDecayedPointer(const Token *tok)
{
if (!tok)
return false;
if (!tok->astParent())
return false;
if (astIsPointer(tok->astParent()) && !Token::simpleMatch(tok->astParent(), "return"))
return true;
if (tok->astParent()->isConstOp())