diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2012-10-18 10:26:54 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-10-18 10:30:41 +0200 |
commit | d50cea883034e0c3ae07f441912437de50f8b4ac (patch) | |
tree | a17cf3d261757407d0e0a4825a886a4a9bb6788a /src/plugins | |
parent | 57ce8280b991bc4af5ce6d66fc2ef17209e8bcd6 (diff) |
Fix warnings about unused variables in C++ lexer.
Change-Id: I8331ff95f5b3c80e15cd71dbce2bb6de17a49c8e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/scanner/cpp/Lexer.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/scanner/cpp/Lexer.cpp b/src/plugins/scanner/cpp/Lexer.cpp index eaafbf6dc..a4884d737 100644 --- a/src/plugins/scanner/cpp/Lexer.cpp +++ b/src/plugins/scanner/cpp/Lexer.cpp @@ -507,10 +507,10 @@ void Lexer::scan_helper(Token *tok) case '<': if (f._scanAngleStringLiteralTokens) { - const char *yytext = _currentChar; + //const char *yytext = _currentChar; while (_yychar && _yychar != '>') yyinp(); - int yylen = _currentChar - yytext; + //int yylen = _currentChar - yytext; // ### assert(_yychar == '>'); if (_yychar == '>') yyinp(); @@ -554,7 +554,7 @@ void Lexer::scan_helper(Token *tok) default: { if (f._objCEnabled) { if (ch == '@' && _yychar >= 'a' && _yychar <= 'z') { - const char *yytext = _currentChar; + //const char *yytext = _currentChar; do { yyinp(); @@ -562,7 +562,7 @@ void Lexer::scan_helper(Token *tok) break; } while (_yychar); - const int yylen = _currentChar - yytext; + // const int yylen = _currentChar - yytext; //tok->f.kind = classifyObjCAtKeyword(yytext, yylen); /// ### FIXME break; } else if (ch == '@' && _yychar == '"') { @@ -571,7 +571,7 @@ void Lexer::scan_helper(Token *tok) yyinp(); tok->f.kind = T_AT_STRING_LITERAL; - const char *yytext = _currentChar; + //const char *yytext = _currentChar; while (_yychar && _yychar != '"') { if (_yychar != '\\') @@ -585,7 +585,7 @@ void Lexer::scan_helper(Token *tok) } // assert(_yychar == '"'); - int yylen = _currentChar - yytext; + //int yylen = _currentChar - yytext; if (_yychar == '"') yyinp(); @@ -605,7 +605,7 @@ void Lexer::scan_helper(Token *tok) ? T_WIDE_STRING_LITERAL : T_WIDE_CHAR_LITERAL; - const char *yytext = _currentChar; + //const char *yytext = _currentChar; while (_yychar && _yychar != quote) { if (_yychar != '\\') @@ -619,20 +619,20 @@ void Lexer::scan_helper(Token *tok) } // assert(_yychar == quote); - int yylen = _currentChar - yytext; + //int yylen = _currentChar - yytext; if (_yychar == quote) yyinp(); } else if (std::isalpha(ch) || ch == '_' || ch == '$') { - const char *yytext = _currentChar - 1; + //const char *yytext = _currentChar - 1; while (std::isalnum(_yychar) || _yychar == '_' || _yychar == '$') yyinp(); - int yylen = _currentChar - yytext; + //int yylen = _currentChar - yytext; tok->f.kind = T_IDENTIFIER; break; } else if (std::isdigit(ch)) { - const char *yytext = _currentChar - 1; + //const char *yytext = _currentChar - 1; while (_yychar) { if (_yychar == 'e' || _yychar == 'E') { yyinp(); @@ -646,7 +646,7 @@ void Lexer::scan_helper(Token *tok) break; } } - int yylen = _currentChar - yytext; + //int yylen = _currentChar - yytext; tok->f.kind = T_NUMERIC_LITERAL; break; } else { |