![]() |
![]() |
3330 | ![]() |
||||
![]() | |||||||
| Functions | REFERENCE - ISO:C90-6.3.2.2 Function Calls | ||||||
This function has been called in more than one place and the number of arguments varies. Is this intended ? Message 3330 is never generated if a function prototype is visible. It is only generated if the function has been declared with an old style declaration or if the function has not been declared at all. In either case, it would be wise to amend the code so that a declaration is visible wherever the function is called and ensure that the definition and any declarations of the function are specified using a function prototype. For example:
/*PRQA S 1303,3001,3198,3199,3203,3408,3447 ++*/
extern int g1;
extern int g2;
extern int foo();
extern void func(void)
{
int r;
r = foo( g1 );
r = foo( g1, g2 ); /* Message 1331 */
} /* Message 3330 */
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |