Skip to content

Commit

Permalink
democlient/democlient.cpp: fixed size of input
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Sep 30, 2024
1 parent 61b090b commit 8398c52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions democlient/democlient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ class CppcheckExecutor : public ErrorLogger {
cppcheck.settings().certainty.enable(Certainty::inconclusive);
}

template<std::size_t size>
void run(const char (&code)[size]) {
cppcheck.checkBuffer(FileWithDetails("test.cpp"), reinterpret_cast<const uint8_t*>(code), size-1);
void run(const char* code) {
cppcheck.checkBuffer(FileWithDetails("test.cpp"), reinterpret_cast<const uint8_t*>(code), strlen(code));
}

void reportOut(const std::string & /*outmsg*/, Color /*c*/) override {}
Expand Down

0 comments on commit 8398c52

Please sign in to comment.