We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc77a6a commit e101425Copy full SHA for e101425
2 files changed
addons/misra.py
@@ -901,7 +901,7 @@ def misra_11_6(data):
901
continue
902
if vt1.pointer == 1 and vt1.type == 'void' and vt2.pointer == 0 and token.astOperand1.str != "0":
903
reportError(token, 11, 6)
904
- elif vt1.pointer == 0 and vt2.pointer == 1 and vt2.type == 'void':
+ elif vt1.pointer == 0 and vt1.type != 'void' and vt2.pointer == 1 and vt2.type == 'void':
905
906
907
addons/test/misra-test.c
@@ -196,9 +196,10 @@ void misra_11_5(void *p) {
196
197
void misra_11_6() {
198
void *p;
199
- p = (void*)123; // 11.6
200
- x = (u64)p; // 11.6
201
- p = ( void * )0 // no-warning
+ p = (void*)123; // 11.6
+ x = (u64)p; // 11.6
+ p = ( void * )0; // no-warning
202
+ (void)p; // no-warning
203
}
204
205
0 commit comments