From c7ed1de41923eb8240b6010ec446e2ce6ab45e9a Mon Sep 17 00:00:00 2001 From: makulik Date: Sun, 23 Oct 2011 11:15:12 +0200 Subject: [PATCH] =?UTF-8?q?Signed-off-by:=20G=C3=BCnther=20Makulik=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/cmdlineparser.cpp | 17 ++++++----------- test/testcmdlineparser.cpp | 3 +-- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 89ea20798..c79efde07 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -68,13 +68,10 @@ static void AddInclPathsToList(const std::string& FileList, std::list_includePaths.push_back(path); - } - else if (strncmp(argv[i], "--includes-file=", 16) == 0) - { + } else if (strncmp(argv[i], "--includes-file=", 16) == 0) { // open this file and read every input file (1 file name per line) AddInclPathsToList(16 + argv[i], _settings->_includePaths); } @@ -708,8 +703,8 @@ void CmdLineParser::PrintHelp() " -I Give include path. Give several -I parameters to give\n" " several paths. First given path is checked first. If\n" " paths are relative to source files, this is not needed.\n" - " --includes-file=\n" - " Specify the include paths to check in a text file. Add\n" + " --includes-file=\n" + " Specify the include paths to check in a text file. Add\n" " one include path per line.\n" " -i Give a source file or source file directory to exclude\n" " from the check. This applies only to source files so\n" diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index a06a2e730..c0947c2c1 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -366,8 +366,7 @@ private: ASSERT_EQUALS("framework/", settings._includePaths.front()); } - void includesFile() - { + void includesFile() { // TODO: Fails since cannot open the file REDIRECT; const char *argv[] = {"cppcheck", "--includes-file=inclpaths.txt", "file.cpp"};