Skip to content

Commit

Permalink
Merge pull request #457 from jketema/prototype
Browse files Browse the repository at this point in the history
Use new `isPrototyped` predicate in RULE-8-2
  • Loading branch information
jketema authored Nov 29, 2023
2 parents 7db8a89 + faf222e commit 20c1f72
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ where
msg = "Function " + f + " does not specify void for no parameters present."
or
//parameters declared in declaration list (not in function signature)
//have placeholder file location associated only
exists(Parameter p |
p.getFunction() = f and
not p.getFile() = f.getFile() and
msg = "Function " + f + " declares parameter in unsupported declaration list."
)
//have no prototype
not f.isPrototyped() and
not hasZeroParamDecl(f) and
msg = "Function " + f + " declares parameter in unsupported declaration list."
)
select f, msg

0 comments on commit 20c1f72

Please sign in to comment.