TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
ASML C Coding Standard
Search

Rule:  7.19.bChecked automatically with code checker

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.