[previous] 1048 [next] [C] Default argument values are missing for some parameters in this function declaration. This is not allowed.
Constraint violations

Default arguments are a C++ specific feature, which is provided as an extension to ISO:C Standard by some compilers.

QA·C will accept a constant expression or an object identifier as a default argument for a parameter, and use that argument whenever one is not provided explicitly in a function call.

Once a default argument is provided for a parameter, all subsequent parameters in a function declaration must also have default arguments. This message will be issued whenever a function declaration does not adhere to this constraint.

For example:


/* PRQA S 1-9999 ++ */
/* PRQA S 1046,1048 -- */

extern int f1 (int = 0, char);        /* Message 1046, 1048 */

extern int f2 (int a = 0, char b);    /* Message 1046, 1048 */

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents