misra: fix false positive in 11.7 (#2233)
This commit is contained in:
parent
997803869d
commit
67971db58f
|
@ -1209,7 +1209,7 @@ class MisraChecker:
|
||||||
continue
|
continue
|
||||||
if (vt2.pointer > 0 and vt1.pointer == 0 and
|
if (vt2.pointer > 0 and vt1.pointer == 0 and
|
||||||
not vt1.isIntegral() and not vt1.isEnum() and
|
not vt1.isIntegral() and not vt1.isEnum() and
|
||||||
vt2.type != 'void'):
|
vt1.type != 'void'):
|
||||||
self.reportError(token, 11, 7)
|
self.reportError(token, 11, 7)
|
||||||
elif (vt1.pointer > 0 and vt2.pointer == 0 and
|
elif (vt1.pointer > 0 and vt2.pointer == 0 and
|
||||||
not vt2.isIntegral() and not vt2.isEnum() and
|
not vt2.isIntegral() and not vt2.isEnum() and
|
||||||
|
|
|
@ -258,6 +258,11 @@ void misra_11_7(int *p, float f) {
|
||||||
y = ( int * ) f; //11.7
|
y = ( int * ) f; //11.7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void misra_11_7_extra(int *p, float f, bool b) {
|
||||||
|
(void) p; // no-warning
|
||||||
|
(void) f; // no-warning
|
||||||
|
}
|
||||||
|
|
||||||
char * misra_11_8_const(const char *str) { }
|
char * misra_11_8_const(const char *str) { }
|
||||||
char * misra_11_8(const char *str) {
|
char * misra_11_8(const char *str) {
|
||||||
(void)misra_11_8_const(str); // no-warning
|
(void)misra_11_8_const(str); // no-warning
|
||||||
|
|
Loading…
Reference in New Issue