Update test. An inconclusive warning message is now shown.

This commit is contained in:
Daniel Marjamäki 2020-06-14 22:57:50 +02:00
parent 2b0e4926bc
commit 3fe2b6fe50
1 changed files with 1 additions and 1 deletions

View File

@ -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"