Skip to content

Commit 9d57b83

Browse files
authored
fixed passedByValue warning hidden by suppression for false positive (cppcheck-opensource#2974)
1 parent 7861aa0 commit 9d57b83

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cli/cppcheckexecutor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ bool CppCheckExecutor::tryLoadLibrary(Library& destination, const char* basepath
11701170
* Execute a shell command and read the output from it. Returns true if command terminated successfully.
11711171
*/
11721172
// cppcheck-suppress passedByValue
1173-
bool CppCheckExecutor::executeCommand(std::string exe, std::vector<std::string> args, std::string redirect, std::string *output)
1173+
bool CppCheckExecutor::executeCommand(std::string exe, std::vector<std::string> args, const std::string &redirect, std::string *output)
11741174
{
11751175
output->clear();
11761176

cli/cppcheckexecutor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class CppCheckExecutor : public ErrorLogger {
111111
/**
112112
* Execute a shell command and read the output from it. Returns true if command terminated successfully.
113113
*/
114-
static bool executeCommand(std::string exe, std::vector<std::string> args, std::string redirect, std::string *output);
114+
static bool executeCommand(std::string exe, std::vector<std::string> args, const std::string &redirect, std::string *output);
115115

116116
protected:
117117

0 commit comments

Comments
 (0)