This commit is contained in:
parent
b0cde34d1a
commit
282c195a6f
|
@ -424,6 +424,8 @@ jobs:
|
|||
./cppcheck --error-exitcode=1 --inline-suppr --addon=threadsafety addons/test/threadsafety
|
||||
./cppcheck --error-exitcode=1 --inline-suppr --addon=threadsafety --std=c++03 addons/test/threadsafety
|
||||
./cppcheck --error-exitcode=1 --inline-suppr --addon=misra addons/test/misra/crash*.c
|
||||
./cppcheck --error-exitcode=1 --inline-suppr --addon=misra --enable=information addons/test/misra/config*.c
|
||||
|
||||
./cppcheck --addon=misra --enable=style --inline-suppr --enable=information --error-exitcode=1 addons/test/misra/misra-ctu-*-test.c
|
||||
pushd addons/test
|
||||
# We'll force C89 standard to enable an additional verification for
|
||||
|
|
|
@ -3315,6 +3315,10 @@ class MisraChecker:
|
|||
continue
|
||||
if isKeyword(tok.str) or isStdLibId(tok.str):
|
||||
continue
|
||||
if tok.astParent is None:
|
||||
continue
|
||||
if tok.astParent.str == "." and tok.astParent.valueType:
|
||||
continue
|
||||
self.report_config_error(tok, "Variable '%s' is unknown" % tok.str)
|
||||
|
||||
def misra_17_6(self, rawTokens):
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
struct S {
|
||||
uint32_t some[100];
|
||||
};
|
||||
|
||||
void foo( void )
|
||||
{
|
||||
if (((S *)0x8000)->some[0] != 0U) { }
|
||||
}
|
||||
|
Loading…
Reference in New Issue