Skip to content

Commit 551fcfd

Browse files
authored
fixed Possibly erroneous empty statement Rider warnings (danmar#7010)
1 parent 695da19 commit 551fcfd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/library.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
348348
}
349349
if (allocationId == 0) {
350350
if (nodename == "memory")
351-
while (!ismemory(++mData->mAllocId));
351+
while (!ismemory(++mData->mAllocId)) {}
352352
else
353-
while (!isresource(++mData->mAllocId));
353+
while (!isresource(++mData->mAllocId)) {}
354354
allocationId = mData->mAllocId;
355355
}
356356

lib/token.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ Token* Token::insertToken(const std::string& tokenStr, const std::string& origin
11421142
}
11431143
if (newToken->str() == ";") {
11441144
const Token* statementStart;
1145-
for (statementStart = newToken; statementStart->previous() && !Token::Match(statementStart->previous(), ";|{"); statementStart = statementStart->previous());
1145+
for (statementStart = newToken; statementStart->previous() && !Token::Match(statementStart->previous(), ";|{"); statementStart = statementStart->previous()) {}
11461146
if (Token::Match(statementStart, "using namespace %name% ::|;")) {
11471147
const Token * tok1 = statementStart->tokAt(2);
11481148
std::string nameSpace;

0 commit comments

Comments
 (0)