From 46fb31f9e5c378c3a2f152750828fb615a2d9eea Mon Sep 17 00:00:00 2001 From: Stefan Naewe Date: Fri, 8 Feb 2013 11:35:08 +0100 Subject: [PATCH] lib/tokenize: fix two compiler warnings about emtpy while loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes these warnings: lib/tokenize.cpp: In member function ‘bool Tokenizer::tokenize(std::istream&, const char*, const std::string&)’: lib/tokenize.cpp:1962: warning: suggest a space before ‘;’ or explicit braces around empty body in ‘while’ statement lib/tokenize.cpp: In member function ‘bool Tokenizer::tokenizeCondition(const std::string&)’: lib/tokenize.cpp:2174: warning: suggest a space before ‘;’ or explicit braces around empty body in ‘while’ statement Signed-off-by: Stefan Naewe --- lib/tokenize.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index dee14bf07..c422b84a1 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1959,7 +1959,8 @@ bool Tokenizer::tokenize(std::istream &code, // Remove redundant parentheses simplifyRedundantParentheses(); for (Token *tok = list.front(); tok; tok = tok->next()) - while (TemplateSimplifier::simplifyNumericCalculations(tok)); + while (TemplateSimplifier::simplifyNumericCalculations(tok)) + ; // Handle templates.. simplifyTemplates(); @@ -2171,7 +2172,8 @@ bool Tokenizer::tokenizeCondition(const std::string &code) for (Token *tok = list.front(); tok; tok = tok->next()) - while (TemplateSimplifier::simplifyNumericCalculations(tok)); + while (TemplateSimplifier::simplifyNumericCalculations(tok)) + ; while (simplifyLogicalOperators()) { }