Fix crash in addons/test/test-misra.py (#2652)
This commit is contained in:
parent
79d3f488da
commit
a96a879b6d
|
@ -13,7 +13,7 @@ def find_cppcheck_binary():
|
||||||
if os.path.exists(location):
|
if os.path.exists(location):
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("Could not fine cppcheck binary")
|
raise RuntimeError("Could not find cppcheck binary")
|
||||||
|
|
||||||
return location
|
return location
|
||||||
|
|
||||||
|
|
|
@ -3457,6 +3457,8 @@ static bool isDecayedPointer(const Token *tok)
|
||||||
{
|
{
|
||||||
if (!tok)
|
if (!tok)
|
||||||
return false;
|
return false;
|
||||||
|
if (!tok->astParent())
|
||||||
|
return false;
|
||||||
if (astIsPointer(tok->astParent()) && !Token::simpleMatch(tok->astParent(), "return"))
|
if (astIsPointer(tok->astParent()) && !Token::simpleMatch(tok->astParent(), "return"))
|
||||||
return true;
|
return true;
|
||||||
if (tok->astParent()->isConstOp())
|
if (tok->astParent()->isConstOp())
|
||||||
|
|
Loading…
Reference in New Issue