diff --git a/cppcheck.cpp b/cppcheck.cpp index e0ec7d9ca..99431c73a 100644 --- a/cppcheck.cpp +++ b/cppcheck.cpp @@ -62,7 +62,7 @@ void CppCheck::addFile( const std::string &path, const std::string &content ) _fileContents[ path ] = content; } -std::string CppCheck::parseFromArgs( int argc, const char* argv[] ) +std::string CppCheck::parseFromArgs( int argc, const char* const argv[] ) { std::vector pathnames; bool Recursive = false; diff --git a/cppcheck.h b/cppcheck.h index a20b28449..bbd3f1bd8 100644 --- a/cppcheck.h +++ b/cppcheck.h @@ -89,7 +89,7 @@ class CppCheck : public ErrorLogger * string containing "help" text if no files were found to be * checked. */ - std::string parseFromArgs( int argc, const char* argv[] ); + std::string parseFromArgs( int argc, const char* const argv[] ); private: void checkFile(const std::string &code, const char FileName[]); diff --git a/cppcheckexecutor.cpp b/cppcheckexecutor.cpp index c2e9c0f55..ae058ac20 100644 --- a/cppcheckexecutor.cpp +++ b/cppcheckexecutor.cpp @@ -30,7 +30,7 @@ CppCheckExecutor::~CppCheckExecutor() //dtor } -void CppCheckExecutor::check( int argc, const char* argv[] ) +void CppCheckExecutor::check( int argc, const char* const argv[] ) { CppCheck cppCheck( *this ); std::string result = cppCheck.parseFromArgs( argc, argv ); diff --git a/cppcheckexecutor.h b/cppcheckexecutor.h index 0559e8fbe..cf6e2be87 100644 --- a/cppcheckexecutor.h +++ b/cppcheckexecutor.h @@ -47,7 +47,7 @@ public: * @param argc from main() * @param argv from main() */ - void check( int argc, const char* argv[] ); + void check( int argc, const char* const argv[] ); /** * Errors and warnings are directed here. This should be