[previous] 1332 [next] Type or number of arguments doesn't match prototype found later.
Functions

This function is being called without a previous prototype declaration. However, the number of arguments or the type of the arguments in the function call is different from those specified in a prototype declaration encountered later on.

It is always advisable to use function prototypes consistently throughout your source code. Function prototypes are best located in header files and should always be positioned before any function calls. It can be dangerous to use them in some places but not in others. When functions are called in the absence of a prototype, arguments of type char, short and float are subject to default argument promotion.

For example:


/*PRQA S 1302,2017,2110,2114,3199,3203,3227,3408,3447,3602 ++*/

void test(signed char a)
{
    int r;

    r = foo(a);                       /* Messages 1332 and 3335 */
}

extern int foo ( unsigned char a );   /* Message 0626           */


MISRA C:2012 Rules applicable to message 1332:

Rule-1.3  (Required) There shall be no occurrence of undefined or critical unspecified behaviour


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