[previous] 0345 [next] Using the keyword 'void'.
K+R compatibility REFERENCE - ISO:C90-6.1.2.5 Types

The keyword 'void' is being used. This was not supported in early versions of the C language and would have been treated just as another identifier.

Be aware that message 0345 is only generated when the "-k+r v" option is enabled.

For example:


/*PRQA S 553,2017,3206,3408,3447 ++*/
/*****************************
 * OPTIONS: -k+r v
 ****************************/

extern void f1(int a);                          /* Message 0345 */
extern int  f2(void);                           /* Message 0345 */

extern void f1(int a)                           /* Message 0345 */
{
    return;
}

extern int f2(void)                             /* Message 0345 */
{
    return 1;
}


No MISRA C:2012 Rules applicable to message 0345


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