Synopsis: | The arguments in a formatted output function shall match the output specifiers in the format specification. |
Language: | C |
Severity Level: | 1 |
Category: | Library |
Description: |
Justification Execution leads to undefined results when an output specifier and argument type do not match. Example printf("%i", p); /* WRONG */ printf("%ll", l); /* WRONG */ printf("%o"); /* WRONG */ printf(" ", i); /* WRONG */ Note Format specifier must be constant, when possible, to allow checking. |