From c3203bf31637a960d1bf579fb7092a1ae850cdb5 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 23 Jan 2019 13:20:14 -0500 Subject: 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. --- Source/cmListFileCache.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index ff793f6..cc2c09f 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -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(lastLine = cmListFileLexer_GetCurrentLine(this->Lexer)), + token = cmListFileLexer_Scan(this->Lexer))) { if (token->type == cmListFileLexer_Token_Space || token->type == cmListFileLexer_Token_Newline) { this->Separation = SeparationOkay; -- cgit v0.12