Skip to content

Commit

Permalink
fix some typos found by codespell.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Feb 4, 2018
1 parent 6ce9646 commit f009cfc
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cli/threadexecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ThreadExecutor : public ErrorLogger {

/**
* @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);
Expand Down
2 changes: 1 addition & 1 deletion lib/importproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static void importPropertyGroup(const tinyxml2::XMLElement *node, std::map<std::
static void loadVisualStudioProperties(const std::string &props, std::map<std::string,std::string,cppcheck::stricmp> *variables, std::string *includePath, const std::string &additionalIncludeDirectories, std::list<ItemDefinitionGroup> &itemDefinitionGroupList)
{
std::string filename(props);
// variables cant be resolved
// variables can't be resolved
if (!simplifyPathWithVariables(filename, *variables))
return;

Expand Down
2 changes: 1 addition & 1 deletion lib/symboldatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/symboldatabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class CPPCHECKLIB Type {
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
*/
Expand Down
3 changes: 1 addition & 2 deletions lib/tokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -10148,4 +10148,3 @@ const Token *Tokenizer::findSQLBlockEnd(const Token *tokSQLStart)

return tokLastEnd;
}

4 changes: 1 addition & 3 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -3292,5 +3292,3 @@ std::string ValueFlow::eitherTheConditionIsRedundant(const Token *condition)
}
return "Either the condition '" + condition->expressionString() + "' is redundant";
}


2 changes: 1 addition & 1 deletion test/testmathlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ class TestMathLib : public TestFixture {
// `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"));
Expand Down
6 changes: 3 additions & 3 deletions test/testtokenize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5579,15 +5579,15 @@ class TestTokenizer : public TestFixture {
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<wchar_t> s;"; // Thats obviously not std::string
"string<wchar_t> 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"
Expand Down
2 changes: 1 addition & 1 deletion tools/matchcompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def _replaceTokenFindMatch(self, line, linenr, filename):
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);
Expand Down

0 comments on commit f009cfc

Please sign in to comment.