[previous] 2051 [next] The 'int' type specifier has been omitted from an object declaration.
Declarations and Definitions

The type of an object has not been explicitly defined and is therefore implicitly defined as int. This is permitted in ISO:C90 but is not allowed in ISO:C99.

For example:


/*PRQA S 506,2017,3210,3227,3408,3447,3602 ++*/

extern foo1(void);                      /* Message 2050 */

extern const va;                        /* Message 2051 */

extern int foo2(const * p)
{                                       /* Message 2051 */
    return *p;
}

extern foo3(void)
{                                       /* Message 2050 */
    const x = 10;                       /* Message 2051 */
    return x;
}


MISRA C:2012 Rules applicable to message 2051:

Rule-8.1  (Required) Types shall be explicitly specified


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