![]() |
![]() |
1331 | ![]() |
||||
![]() | |||||||
| Functions | |||||||
The number or type of the arguments in this function call is different from those in a previous call to the same function. This is a dangerous situation and suggests that at least one of the function calls is incorrect. This message will only be generated when the function is being called and has not previously been declared with a prototype declaration. See message 3335. It is always advisable to use function prototypes consistently throughout your source code; but be aware that 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,3198,3199,3203,3227,3330,3408 ++*/
void test(int a, long b)
{
int r;
r = foo(a); /* Message 3335 */
r = foo(b); /* Message 1331 */
r = foo(a, b); /* Message 1331 */
}
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |