[previous] 0658 [next] [U] Parameter cannot have 'void' type.
Explicitly undefined REFERENCE - ISO:C90-6.5.4.3 Function Declarators - Semantics

A function parameter has been declared with type "void". This is meaningless.

This message is only generated when a function is defined using old style syntax. If a parameter is declared with type "void" in a new style declaration or definition, message 0664 is generated - a constraint error.

For example:


/*PRQA S 553,1304,2017,3002,3206,3210,3408,3447,3602 ++*/

extern void f1(void);                   /* OK */

extern void f2(int x, void v);          /* Message 0664 */

extern void f3(void * pv);              /* OK */

extern void f4(a)                       /* Message 0658 */
void a;
{
}


MISRA-C:2004 Rules applicable to message 0658:

Rule  1.2  (Required) No reliance shall be placed on undefined or unspecified behaviour.


See also:

QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents