Skip to content

Commit

Permalink
Fixed #10528 (FP: misra-c2012-8.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Dec 22, 2021
1 parent 5a95ece commit 5491670
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 @@ -1985,7 +1985,7 @@ def misra_8_4(self, cfg):
continue
if not is_source_file(func.token.file):
continue
if func.token.file != func.tokenDef.file:
if func.token != func.tokenDef:
continue
if func.tokenDef.str == 'main':
continue
Expand Down
2 changes: 2 additions & 0 deletions addons/test/misra/misra-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ static int misra_8_2_q
(); // 8.2

void misra_8_4_foo(void) {} // 8.4
extern void misra_8_4_func(void);
void misra_8_4_func(void) {}
static void misra_8_4_bar(void) {} // Declared in header
extern int16_t misra_8_4_count; // no-warning
int16_t misra_8_4_count = 0; // Compliant
Expand Down

0 comments on commit 5491670

Please sign in to comment.