Update test. An inconclusive warning message is now shown.
This commit is contained in:
parent
2b0e4926bc
commit
3fe2b6fe50
|
@ -928,7 +928,7 @@ private:
|
||||||
" const int scanrc=sscanf(line, \"Project(\\\"{%36s}\\\")\", projectId);\n"
|
" const int scanrc=sscanf(line, \"Project(\\\"{%36s}\\\")\", projectId);\n"
|
||||||
" sscanf(input, \"%5s\", output);\n"
|
" sscanf(input, \"%5s\", output);\n"
|
||||||
"}", true);
|
"}", true);
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("[test.cpp:6]: (warning, inconclusive) Width 36 given in format string (no. 1) is smaller than destination buffer 'projectId[2048]'.\n", errout.str());
|
||||||
|
|
||||||
check("void foo(unsigned int i) {\n"
|
check("void foo(unsigned int i) {\n"
|
||||||
" scanf(\"%h\", &i);\n"
|
" scanf(\"%h\", &i);\n"
|
||||||
|
|
Loading…
Reference in New Issue