Skip to content

Commit 57b5742

Browse files
committed
Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <[email protected]>
1 parent b6cba4a commit 57b5742

21 files changed

Lines changed: 28 additions & 28 deletions

addons/cppcheckdata.doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1658,7 +1658,7 @@ UML_LOOK = NO
16581658
# the class node. If there are many fields or methods and many nodes the
16591659
# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
16601660
# threshold limits the number of items for each type to make the size more
1661-
# managable. Set this to 0 for no limit. Note that the threshold may be
1661+
# manageable. Set this to 0 for no limit. Note that the threshold may be
16621662
# exceeded by 50% before the limit is enforced.
16631663

16641664
UML_LIMIT_NUM_FIELDS = 10

addons/y2038/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ _TIME_BITS is defined equal to 64 by user code when it wants 64-bit time
5858
support from the GNU glibc. Code which does not define _TIME_BITS equal to 64
5959
(or defines it to something else than 64) runs a risk of not being Y2038-proof.
6060

61-
__USE_TIME_BITS64 is defined by the GNU glibc when it actualy provides 64-bit
61+
__USE_TIME_BITS64 is defined by the GNU glibc when it actually provides 64-bit
6262
time support. When this is defined, then all glibc symbols, barring bugs, are
6363
Y2038-proof (but your code might have its own Y2038 bugs, if it handles signed
6464
32-bit Unix epoch values).

cli/cppcheckexecutor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class CppCheckExecutor : public ErrorLogger {
100100

101101
/**
102102
* Tries to load a library and prints warning/error messages
103-
* @return false, if an error occured (except unknown XML elements)
103+
* @return false, if an error occurred (except unknown XML elements)
104104
*/
105105
static bool tryLoadLibrary(Library& destination, const char* basepath, const char* filename);
106106

gui/test/data/benchmark/simple.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ void CheckOther::invalidScanf()
796796

797797
bool format = false;
798798

799-
// scan the string backwards, so we dont need to keep states
799+
// scan the string backwards, so we don't need to keep states
800800
const std::string &formatstr(formatToken->str());
801801
for (unsigned int i = 1; i < formatstr.length(); i++) {
802802
if (formatstr[i] == '%')

lib/checkassert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void CheckAssert::checkVariableAssignment(const Token* assignTok, const Scope *a
114114
if (!prevVar)
115115
return;
116116

117-
// Variable declared in inner scope in assert => dont warn
117+
// Variable declared in inner scope in assert => don't warn
118118
if (assertionScope != prevVar->scope()) {
119119
const Scope *s = prevVar->scope();
120120
while (s && s != assertionScope)

lib/checkbufferoverrun.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void CheckBufferOverrun::outOfBoundsError(const Token *tok, const std::string &w
193193

194194
void CheckBufferOverrun::pointerOutOfBoundsError(const Token *tok, const Token *index, const MathLib::bigint indexvalue)
195195
{
196-
// The severity is portability instead of error since this ub doesnt
196+
// The severity is portability instead of error since this ub doesn't
197197
// cause bad behaviour on most implementations. people create out
198198
// of bounds pointers by intention.
199199
const std::string expr(tok ? tok->expressionString() : std::string(""));

lib/tokenize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,7 +2678,7 @@ void Tokenizer::setVarIdPass1()
26782678
const Token *tok3 = tok2->next();
26792679
if (!tok3->isStandardType() && tok3->str() != "void" && !Token::Match(tok3, "struct|union|class %type%") && tok3->str() != "." && !Token::Match(tok2->link()->previous(), "[&*]")) {
26802680
if (!scopeStack.top().isExecutable) {
2681-
// Detecting initializations with () in non-executable scope is hard and often impossible to be done safely. Thus, only treat code as a variable that definitly is one.
2681+
// Detecting initializations with () in non-executable scope is hard and often impossible to be done safely. Thus, only treat code as a variable that definitely is one.
26822682
decl = false;
26832683
bool rhs = false;
26842684
for (; tok3; tok3 = tok3->nextArgumentBeforeCreateLinks2()) {
@@ -7299,7 +7299,7 @@ bool Tokenizer::IsScopeNoReturn(const Token *endScopeToken, bool *unknown) const
72997299
}
73007300
}
73017301

7302-
// don't warn for nonglobal functions (class methods, functions hidden in namespaces) since they cant be configured yet
7302+
// don't warn for nonglobal functions (class methods, functions hidden in namespaces) since they can't be configured yet
73037303
// FIXME: when methods and namespaces can be configured properly, remove the "globalFunction" check
73047304
if (globalFunction) {
73057305
reportError(endScopeToken->previous(),

lib/tokenize.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ class CPPCHECKLIB Tokenizer {
750750
* Token list: stores all tokens.
751751
*/
752752
TokenList list;
753-
// Implement tokens() as a wrapper for convinience when using the TokenList
753+
// Implement tokens() as a wrapper for convenience when using the TokenList
754754
const Token* tokens() const {
755755
return list.front();
756756
}

lib/tokenlist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ static void compilePrecedence2(Token *&tok, AST_state& state)
678678
// - Nest the round bracket under the square bracket.
679679
// - Nest what follows the lambda (if anything) with the lambda opening [
680680
// - Compile the content of the lambda function as separate tree (this is done later)
681-
// this must be consistant with isLambdaCaptureList
681+
// this must be consistent with isLambdaCaptureList
682682
Token* squareBracket = tok;
683683
Token* roundBracket = squareBracket->link()->next();
684684
Token* curlyBracket = roundBracket->link()->next();

lib/valueflow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2098,7 +2098,7 @@ static void execute(const Token *expr,
20982098
else if (expr->str() == "%")
20992099
*result = result1 % result2;
21002100
else if (expr->str() == "<<") {
2101-
if (result2 < 0 || result1 < 0) { // dont perform UB
2101+
if (result2 < 0 || result1 < 0) { // don't perform UB
21022102
*error= true;
21032103
} else {
21042104
*result = result1 << result2;

0 commit comments

Comments
 (0)