From f009cfc845da27d733ed150946cd5f4f73f9f53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 4 Feb 2018 20:53:43 +0100 Subject: [PATCH] fix some typos found by codespell. --- .travis.yml | 2 +- cli/threadexecutor.h | 2 +- lib/importproject.cpp | 2 +- lib/symboldatabase.cpp | 2 +- lib/symboldatabase.h | 2 +- lib/tokenize.cpp | 3 +-- lib/valueflow.cpp | 4 +--- test/testmathlib.cpp | 2 +- test/testtokenize.cpp | 6 +++--- tools/matchcompiler.py | 2 +- 10 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77156b62f..9e2d7d468 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,7 +49,7 @@ script: - if [[ "$CHECK_LLVM" == "yes" ]] && [[ "$CC" == "clang" ]]; then wget "https://github.com/llvm-mirror/llvm/archive/7733e74e5454d6f18da28c06be917c1e73d12d01.zip" & make -j 4 & wait; unzip 7733e74e5454d6f18da28c06be917c1e73d12d01.zip > /dev/null; touch /tmp/llvm.cppcheck; cd ./llvm-7733e74e5454d6f18da28c06be917c1e73d12d01 ; ../cppcheck . --max-configs=1 --enable=all --inconclusive --exception-handling --template="{callstack} ({severity}) {message} [{id}]" -j 2 |& tee /tmp/llvm.cppcheck; cd ../ ; echo "LLVM" ; ! grep "process crashed with signal\|Internal error\. compiled" /tmp/llvm.cppcheck; exit; fi # check if dmake needs to be rerun but if yes, don't fail the build but notify us. # to update dmake: "make dmake; ./dmake; and commit - - echo "If the following commmand fails, run 'make dmake; make run-dmake' and commit the resulting change." + - echo "If the following command fails, run 'make dmake; make run-dmake' and commit the resulting change." - if [[ "$CHECK_MAKEFILE_REGEN" == "true" ]]; then make -s dmake; make -s run-dmake ; git diff --exit-code; exit; fi # check with TEST_MATHLIB_VALUE enabled - touch lib/mathlib.cpp test/testmathlib.cpp diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index df94f0608..01cdcffab 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -92,7 +92,7 @@ private: /** * @brief Check load average condition - * @param nchildren - count of currently runned children + * @param nchildren - count of currently ran children * @return true - if new process can be started */ bool checkLoadAverage(size_t nchildren); diff --git a/lib/importproject.cpp b/lib/importproject.cpp index b0fa9db07..7a9c3ba3a 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -432,7 +432,7 @@ static void importPropertyGroup(const tinyxml2::XMLElement *node, std::map *variables, std::string *includePath, const std::string &additionalIncludeDirectories, std::list &itemDefinitionGroupList) { std::string filename(props); - // variables cant be resolved + // variables can't be resolved if (!simplifyPathWithVariables(filename, *variables)) return; diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 3153f830d..9665eec19 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -3219,7 +3219,7 @@ bool Function::isImplicitlyVirtual_rec(const ::Type* baseType, bool& safe) const if (!derivedFromType->derivedFrom.empty() && !derivedFromType->hasCircularDependencies()) { // avoid endless recursion, see #5289 Crash: Stack overflow in isImplicitlyVirtual_rec when checking SVN and - // #5590 with a loop within the class hierarchie. + // #5590 with a loop within the class hierarchy. if (isImplicitlyVirtual_rec(derivedFromType, safe)) { return true; } diff --git a/lib/symboldatabase.h b/lib/symboldatabase.h index 9d8d92a40..d62ded83e 100644 --- a/lib/symboldatabase.h +++ b/lib/symboldatabase.h @@ -147,7 +147,7 @@ public: const Function* getFunction(const std::string& funcName) const; /** - * Check for circulare dependencies, i.e. loops within the class hierarchie + * Check for circulare dependencies, i.e. loops within the class hierarchy * @param ancestors list of ancestors. For internal usage only, clients should not supply this argument. * @return true if there is a circular dependency */ diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 6b1276c04..dde235d67 100755 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -3492,7 +3492,7 @@ bool Tokenizer::simplifySizeof() if (Token::Match(decltok, "%name% [") && Token::simpleMatch(decltok->linkAt(1), "] [")) { const Token *tok2 = decltok; for (unsigned int i = 0; i < derefs; i++) - tok2 = tok2->linkAt(1); // Skip all dimensions that are derefenced before the sizeof call + tok2 = tok2->linkAt(1); // Skip all dimensions that are dereferenced before the sizeof call while (Token::Match(tok2, "] [ %num% ]")) { size *= MathLib::toULongNumber(tok2->strAt(2)); tok2 = tok2->linkAt(1); @@ -10148,4 +10148,3 @@ const Token *Tokenizer::findSQLBlockEnd(const Token *tokSQLStart) return tokLastEnd; } - diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index 1b79a26b1..8d28613f2 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -1896,7 +1896,7 @@ static bool valueFlowForward(Token * const startToken, } if (values.empty()) { if (settings->debugwarnings) - bailout(tokenlist, errorLogger, tok2, "coumpound assignment of " + tok2->str()); + bailout(tokenlist, errorLogger, tok2, "compound assignment of " + tok2->str()); return false; } } @@ -3292,5 +3292,3 @@ std::string ValueFlow::eitherTheConditionIsRedundant(const Token *condition) } return "Either the condition '" + condition->expressionString() + "' is redundant"; } - - diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp index de00052e9..7355ede37 100644 --- a/test/testmathlib.cpp +++ b/test/testmathlib.cpp @@ -1141,7 +1141,7 @@ private: // `A` is 0x41 and 0101 ASSERT_EQUALS("A", MathLib::normalizeCharacterLiteral("\\x41")); ASSERT_EQUALS("A", MathLib::normalizeCharacterLiteral("\\101")); - // Hexa and octal numbers should not only be intepreted in byte 1 + // Hexa and octal numbers should not only be interpreted in byte 1 ASSERT_EQUALS("TESTATEST", MathLib::normalizeCharacterLiteral("TEST\\x41TEST")); ASSERT_EQUALS("TESTATEST", MathLib::normalizeCharacterLiteral("TEST\\101TEST")); ASSERT_EQUALS("TESTTESTA", MathLib::normalizeCharacterLiteral("TESTTEST\\x41")); diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 43a94f4b5..25d200fda 100755 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -5579,15 +5579,15 @@ private: ASSERT_EQUALS("void foo ( ) { std :: swap ( a , b ) ; }", tokenizeAndStringify(code4, false)); static const char code5[] = "using namespace std;\n" - "void foo() {map(a, b); }"; // Thats obviously not std::map<> + "void foo() {map(a, b); }"; // That's obviously not std::map<> ASSERT_EQUALS("void foo ( ) { map ( a , b ) ; }", tokenizeAndStringify(code5, false)); static const char code6[] = "using namespace std;\n" - "string s;"; // Thats obviously not std::string + "string s;"; // That's obviously not std::string ASSERT_EQUALS("string < wchar_t > s ;", tokenizeAndStringify(code6, false)); static const char code7[] = "using namespace std;\n" - "swap s;"; // Thats obviously not std::swap + "swap s;"; // That's obviously not std::swap ASSERT_EQUALS("swap s ;", tokenizeAndStringify(code7, false)); static const char code8[] = "using namespace std;\n" diff --git a/tools/matchcompiler.py b/tools/matchcompiler.py index c20cb411d..2ce060077 100755 --- a/tools/matchcompiler.py +++ b/tools/matchcompiler.py @@ -544,7 +544,7 @@ class MatchCompiler: varId = res[3] # endToken support. We resolve the overloaded type by checking if varId is used or not. - # Function protoypes: + # Function prototypes: # Token *findsimplematch(const Token *tok, const char pattern[]); # Token *findsimplematch(const Token *tok, const char pattern[], const Token *end); # Token *findmatch(const Token *tok, const char pattern[], unsigned int varId = 0);