Skip to content

Commit 5491670

Browse files
committed
Fixed #10528 (FP: misra-c2012-8.4)
1 parent 5a95ece commit 5491670

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

addons/misra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ def misra_8_4(self, cfg):
19851985
continue
19861986
if not is_source_file(func.token.file):
19871987
continue
1988-
if func.token.file != func.tokenDef.file:
1988+
if func.token != func.tokenDef:
19891989
continue
19901990
if func.tokenDef.str == 'main':
19911991
continue

addons/test/misra/misra-test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,8 @@ static int misra_8_2_q
391391
(); // 8.2
392392

393393
void misra_8_4_foo(void) {} // 8.4
394+
extern void misra_8_4_func(void);
395+
void misra_8_4_func(void) {}
394396
static void misra_8_4_bar(void) {} // Declared in header
395397
extern int16_t misra_8_4_count; // no-warning
396398
int16_t misra_8_4_count = 0; // Compliant

0 commit comments

Comments
 (0)