![]() |
![]() |
1335 | ![]() |
||||
![]() | |||||||
| Functions | |||||||
In this prototype declaration of a function, the parameter types have been specified but not the parameter names. Supplying names for parameters in a function declaration has no semantic significance but it does improve readability. Message 1335 is only generated when parameter names are missing in the declaration of a named function. Message 1336 is generated when parameter names are missing in the declaration of a function type, for example in a typedef or when defining a pointer to a function. For example:
/*PRQA S 553,2017,3205,3210,3447,3672 ++*/
extern int foo1(int, float); /* Message 1335 */
typedef int (typ1)(int, float); /* Message 1336 */
extern int (*pf1)(int); /* Message 1336 */
MISRA C:2012 Rules applicable to message 1335:
| Rule-8.2 (Required) | Function types shall be in prototype form with named parameters |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index | Contents |