cppcheck 2.20.0 generates wrongPrintfScanfArgNum for the following code:
#include <stdio.h> int main() { const char* str = "test."; const size_t size = 5; char buffer[size]; sscanf_s(str, "%4[^.]", buffer, size); return 0; }
test\main.cpp:8:2: error: sscanf_s format string requires 3 parameters but only 2 are given. [wrongPrintfScanfArgNum] sscanf_s(str, "%4[^.]", buffer, size); ^
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14624
Log in to post a comment.
cppcheck 2.20.0 generates wrongPrintfScanfArgNum for the following code:
Thanks for reporting, ticket is here: https://trac.cppcheck.net/ticket/14624