Skip to content

Commit

Permalink
Fix 12651:exception in misra.py, bad code: __arm__
Browse files Browse the repository at this point in the history
  • Loading branch information
swasti16 committed May 6, 2024
1 parent 665cfce commit 65e74db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/misra.py
Original file line number Diff line number Diff line change
Expand Up @@ -4056,7 +4056,7 @@ def misra_22_9(self, cfg):
def misra_22_10(self, cfg):
last_function_call = None
for token in cfg.tokenlist:
if token.isName and token.next.str == '(' and not simpleMatch(token.next.link, ') {'):
if token.isName and token.next and token.next.str == '(' and not simpleMatch(token.next.link, ') {'):
name, args = cppcheckdata.get_function_call_name_args(token)
last_function_call = name
if token.str == '}':
Expand Down
2 changes: 2 additions & 0 deletions addons/test/misra/crash11.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// #12651
__arm__

0 comments on commit 65e74db

Please sign in to comment.