This commit is contained in:
parent
543b4adc8a
commit
4cf9a704b4
|
@ -416,6 +416,13 @@ def misra_9_x(self, data, rule, rawTokens = None):
|
|||
if rule == 902 and not ed.isMisra92Compliant():
|
||||
self.reportError(nameToken, 9, 2)
|
||||
if rule == 903 and not ed.isMisra93Compliant():
|
||||
# Do not check when variable is pointer type
|
||||
type_token = variable.nameToken
|
||||
while type_token and type_token.isName:
|
||||
type_token = type_token.previous
|
||||
if type_token and type_token.str == '*':
|
||||
continue
|
||||
|
||||
self.reportError(nameToken, 9, 3)
|
||||
if rule == 904 and not ed.isMisra94Compliant():
|
||||
self.reportError(nameToken, 9, 4)
|
||||
|
|
|
@ -408,6 +408,10 @@ enum misra_8_12_e { misra_e1 = sizeof(int), misra_e2}; // no-crash
|
|||
|
||||
static void misra_8_14(char * restrict str) {(void)str;} // 8.14
|
||||
|
||||
// #11707 -- false positive
|
||||
struct S_9_3 { struct S_9_3* p; int x; };
|
||||
struct S_9_3* s_9_3_array[] = { x, NULL }; // 8.4
|
||||
|
||||
static void misra_9_empty_or_zero_initializers(void) {
|
||||
int a[2] = {}; // 9.2
|
||||
int b[2][2] = {}; // 9.2
|
||||
|
|
Loading…
Reference in New Issue