We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7db8a89 + faf222e commit 20c1f72Copy full SHA for 20c1f72
c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql
@@ -48,11 +48,9 @@ where
48
msg = "Function " + f + " does not specify void for no parameters present."
49
or
50
//parameters declared in declaration list (not in function signature)
51
- //have placeholder file location associated only
52
- exists(Parameter p |
53
- p.getFunction() = f and
54
- not p.getFile() = f.getFile() and
55
- msg = "Function " + f + " declares parameter in unsupported declaration list."
56
- )
+ //have no prototype
+ not f.isPrototyped() and
+ not hasZeroParamDecl(f) and
+ msg = "Function " + f + " declares parameter in unsupported declaration list."
57
)
58
select f, msg
0 commit comments