[previous] 0626 [next] [U] '%s' has different type to previous declaration (which is no longer in scope).
Explicitly undefined REFERENCE - ISO:C90-6.1.2.6 Compatible Type and Composite Type

This global object or function has been declared previously in a different scope but the 2 declarations are different. This will result in undefined behaviour.

For example:


/*PRQA S 2017,2211,3205,3221,3222,3408,3447 ++*/


extern void foo1(void)
{
    extern int glob;
    extern void gf1(void);
}

extern void foo2(void)
{
    extern long glob;                   /* Message 0626 */
    extern void gf1(int x);             /* Message 0626 */
}


MISRA-C:2004 Rules applicable to message 0626:

Rule  1.2  (Required) No reliance shall be placed on undefined or unspecified behaviour.
Rule  8.4  (Required) If objects or functions are declared more than once their types shall be compatible.


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