File tree 3 files changed +16
-0
lines changed
3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,8 @@ jobs:
424
424
./cppcheck --error-exitcode=1 --inline-suppr --addon=threadsafety addons/test/threadsafety
425
425
./cppcheck --error-exitcode=1 --inline-suppr --addon=threadsafety --std=c++03 addons/test/threadsafety
426
426
./cppcheck --error-exitcode=1 --inline-suppr --addon=misra addons/test/misra/crash*.c
427
+ ./cppcheck --error-exitcode=1 --inline-suppr --addon=misra --enable=information addons/test/misra/config*.c
428
+
427
429
./cppcheck --addon=misra --enable=style --inline-suppr --enable=information --error-exitcode=1 addons/test/misra/misra-ctu-*-test.c
428
430
pushd addons/test
429
431
# We'll force C89 standard to enable an additional verification for
Original file line number Diff line number Diff line change @@ -3315,6 +3315,10 @@ def misra_config(self, data):
3315
3315
continue
3316
3316
if isKeyword (tok .str ) or isStdLibId (tok .str ):
3317
3317
continue
3318
+ if tok .astParent is None :
3319
+ continue
3320
+ if tok .astParent .str == "." and tok .astParent .valueType :
3321
+ continue
3318
3322
self .report_config_error (tok , "Variable '%s' is unknown" % tok .str )
3319
3323
3320
3324
def misra_17_6 (self , rawTokens ):
Original file line number Diff line number Diff line change
1
+
2
+ struct S {
3
+ uint32_t some [100 ];
4
+ };
5
+
6
+ void foo ( void )
7
+ {
8
+ if (((S * )0x8000 )-> some [0 ] != 0U ) { }
9
+ }
10
+
You can’t perform that action at this time.
0 commit comments