Typos found by running "codespell" (#2072)

This commit is contained in:
Armin Müller 2019-08-08 21:05:28 +02:00 committed by Daniel Marjamäki
parent 21dc69e3d1
commit 785cc69644
4 changed files with 15 additions and 15 deletions

View File

@ -238,25 +238,25 @@ def int31(data, platform):
def msc24(data):
for token in data.tokenlist:
if isFunctionCall(token, ('asctime',), 1):
reportError(token,'style','Do no use asctime() better use asctime_s()', 'MSC24-C')
reportError(token,'style','Do not use asctime() better use asctime_s()', 'MSC24-C')
elif isFunctionCall(token, ('atof',), 1):
reportError(token,'style','Do no use atof() better use strtod()', 'MSC24-C')
reportError(token,'style','Do not use atof() better use strtod()', 'MSC24-C')
elif isFunctionCall(token, ('atoi',), 1):
reportError(token,'style','Do no use atoi() better use strtol()', 'MSC24-C')
reportError(token,'style','Do not use atoi() better use strtol()', 'MSC24-C')
elif isFunctionCall(token, ('atol',), 1):
reportError(token,'style','Do no use atol() better use strtol()', 'MSC24-C')
reportError(token,'style','Do not use atol() better use strtol()', 'MSC24-C')
elif isFunctionCall(token, ('atoll',), 1):
reportError(token,'style','Do no use atoll() better use strtoll()', 'MSC24-C')
reportError(token,'style','Do not use atoll() better use strtoll()', 'MSC24-C')
elif isFunctionCall(token, ('ctime',), 1):
reportError(token,'style','Do no use ctime() better use ctime_s()', 'MSC24-C')
reportError(token,'style','Do not use ctime() better use ctime_s()', 'MSC24-C')
elif isFunctionCall(token, ('fopen',), 2):
reportError(token,'style','Do no use fopen() better use fopen_s()', 'MSC24-C')
reportError(token,'style','Do not use fopen() better use fopen_s()', 'MSC24-C')
elif isFunctionCall(token, ('freopen',), 3):
reportError(token,'style','Do no use freopen() better use freopen_s()', 'MSC24-C')
reportError(token,'style','Do not use freopen() better use freopen_s()', 'MSC24-C')
elif isFunctionCall(token, ('rewind',), 1):
reportError(token,'style','Do no use rewind() better use fseek()', 'MSC24-C')
reportError(token,'style','Do not use rewind() better use fseek()', 'MSC24-C')
elif isFunctionCall(token, ('setbuf',), 2):
reportError(token,'style','Do no use setbuf() better use setvbuf()', 'MSC24-C')
reportError(token,'style','Do not use setbuf() better use setvbuf()', 'MSC24-C')
# MSC30-C
# Do not use the rand() function for generating pseudorandom numbers

View File

@ -1417,7 +1417,7 @@ PathAnalysis::Progress PathAnalysis::forwardRange(const Token* startToken, const
if (f(info) == Progress::Break)
return Progress::Break;
}
// Prevent inifinite recursion
// Prevent infinite recursion
if (tok->next() == start)
break;
}

View File

@ -774,7 +774,7 @@ void TemplateSimplifier::getTemplateInstantiations()
const bool isUsing = tok->strAt(1) == "using";
if (isUsing && Token::Match(tok->tokAt(2), "%name% <")) {
// Cant have specialized type alias so ignore it
// Can't have specialized type alias so ignore it
Token *tok2 = Token::findsimplematch(tok->tokAt(3), ";");
if (tok2)
tok = tok2;
@ -795,12 +795,12 @@ void TemplateSimplifier::getTemplateInstantiations()
tok = tok2;
}
} else if (Token::Match(tok, "template using %name% <")) {
// Cant have specialized type alias so ignore it
// Can't have specialized type alias so ignore it
Token *tok2 = Token::findsimplematch(tok->tokAt(3), ";");
if (tok2)
tok = tok2;
} else if (Token::Match(tok, "using %name% <")) {
// Cant have specialized type alias so ignore it
// Can't have specialized type alias so ignore it
Token *tok2 = Token::findsimplematch(tok->tokAt(2), ";");
if (tok2)
tok = tok2;

View File

@ -216,7 +216,7 @@ public:
* @return true if same family, false if different family
*/
bool isSameFamily(const TemplateSimplifier::TokenAndName &decl) const {
// maks sure a family flag is set and matches
// make sure a family flag is set and matches
return (flags & (fIsClass | fIsFunction | fIsVariable)) &
(decl.flags & (fIsClass | fIsFunction | fIsVariable));
}