Static Analysis Problem Type Reference
The number of format specifiers does not match the number of arguments.
|
ID |
Code Location |
Description |
|---|---|---|
|
1 |
Format mismatch |
The place where the format string was used |
#include <stdio.h>
extern int x,y;
int main(int argc, char **argv)
{
printf("%s"); // too few arguments: uses a random word on the stack as a string
printf("%-2d", x, y); // too many arguments (y is ignored)
}