MISRA C:2023 Rule 8.2
Description
Rule Definition
Function types shall be in prototype form with named parameters.
Rationale
The rule requires that you specify names and data types for all the parameters in a declaration. The parameter names provide useful information regarding the function interface. A mismatch between a declaration and definition can indicate a programming error. For instance, you mixed up parameters when defining the function. By insisting on parameter names, the rule allows a code reviewer to detect this mismatch.
Polyspace Implementation
The rule checker shows a violation if the parameters in a function declaration or definition are missing names or data types.
Troubleshooting
If you expect a rule violation but do not see it, refer to Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Declarations and Definitions |
Category: Required |
AGC Category: Required |
Version History
Introduced in R2024a