File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1975,11 +1975,11 @@ def misra_8_4(self, cfg):
19751975 if var .nameToken is None :
19761976 continue
19771977 if var .isExtern :
1978- extern_vars .append (var .nameToken )
1978+ extern_vars .append (var .nameToken . str )
19791979 else :
19801980 var_defs .append (var .nameToken )
19811981 for vartok in var_defs :
1982- if vartok not in extern_vars :
1982+ if vartok . str not in extern_vars :
19831983 self .reportError (vartok , 8 , 4 )
19841984
19851985 def misra_8_5 (self , dumpfile , cfg ):
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ int misra_5_1_var_hides_var________d; //5.1 8.4
124124int misra_5_1_var_hides_var________e ; //5.1 8.4
125125
126126extern const uint8_t misra_5_2_var1 ;
127- const uint8_t misra_5_2_var1 = 3 ; // 8.4
127+ const uint8_t misra_5_2_var1 = 3 ;
128128static int misra_5_2_var_hides_var______31x ;
129129static int misra_5_2_var_hides_var______31y ;//5.2
130130static int misra_5_2_function_hides_var_31x ;
@@ -382,9 +382,12 @@ static int misra_8_2_q
382382void misra_8_4_foo (void ) {} // 8.4
383383static void misra_8_4_bar (void ) {} // Declared in header
384384extern int16_t misra_8_4_count ; // no-warning
385- int16_t misra_8_4_count = 0 ; // 8.4
385+ int16_t misra_8_4_count = 0 ; // Compliant
386386extern uint8_t misra_8_4_buf1 [13 ]; // no-warning
387387uint8_t misra_8_4_buf2 [24 ]; // 8.4
388+ typedef struct { uint16_t a ; uint16_t b ; } misra_8_4_struct ;
389+ extern misra_8_4_struct bar [42 ];
390+ misra_8_4_struct bar [42 ]; // compliant
388391
389392static int32_t misra_8_8 = 123 ;
390393extern int32_t misra_8_8 ; // 8.8
You can’t perform that action at this time.
0 commit comments