#9347: Added a robustness test for scanf
This commit is contained in:
parent
15d7b9c83f
commit
7c48874793
|
@ -2879,6 +2879,10 @@ void uninitvar_scanf(void)
|
||||||
char str[42];
|
char str[42];
|
||||||
// cppcheck-suppress uninitvar
|
// cppcheck-suppress uninitvar
|
||||||
(void)scanf(format, str);
|
(void)scanf(format, str);
|
||||||
|
|
||||||
|
// no warning is expected (#9347)
|
||||||
|
int i;
|
||||||
|
sscanf("0", "%d", &i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitvar_vsscanf(void)
|
void uninitvar_vsscanf(void)
|
||||||
|
|
Loading…
Reference in New Issue