Silence -Wcomma warning
We use a comma-in-paren expression to evaluate multiple statements in a condition. Clang warns that this may be incorrect. Follow its suggestion to cast all but the last expression to `void` to silence the warning.
This commit is contained in:
parent
68eabb3576
commit
c3203bf316
@ -193,8 +193,9 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
|
||||
unsigned long lastLine;
|
||||
unsigned long parenDepth = 0;
|
||||
this->Separation = SeparationOkay;
|
||||
while ((lastLine = cmListFileLexer_GetCurrentLine(this->Lexer),
|
||||
token = cmListFileLexer_Scan(this->Lexer))) {
|
||||
while (
|
||||
(static_cast<void>(lastLine = cmListFileLexer_GetCurrentLine(this->Lexer)),
|
||||
token = cmListFileLexer_Scan(this->Lexer))) {
|
||||
if (token->type == cmListFileLexer_Token_Space ||
|
||||
token->type == cmListFileLexer_Token_Newline) {
|
||||
this->Separation = SeparationOkay;
|
||||
|
Loading…
Reference in New Issue
Block a user