diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-04-04 16:53:28 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-04-14 16:33:35 +0000 |
commit | f5fde1eaaff08213a895f8051a625ef693222dad (patch) | |
tree | 4968fe8f5bc7242376ab1ed313bbed67c2504920 /src/plugins/scanner/cpp/Lexer.cpp | |
parent | e2e20d843faf260ef7a2e9ab2aa3fadccb57a7d4 (diff) |
clang-tidy: Fix 'bugprone-narrowing-conversions' warnings
Also, treat those as errors
Change-Id: I0771aa656273fd0a01c7787870d9de9b4c631823
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/scanner/cpp/Lexer.cpp')
-rw-r--r-- | src/plugins/scanner/cpp/Lexer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/scanner/cpp/Lexer.cpp b/src/plugins/scanner/cpp/Lexer.cpp index 1e31b5ed4..5bf5b2367 100644 --- a/src/plugins/scanner/cpp/Lexer.cpp +++ b/src/plugins/scanner/cpp/Lexer.cpp @@ -224,7 +224,7 @@ void Lexer::scan_helper(Token *tok) goto _Lagain; case '"': case '\'': { - const char quote = ch; + const unsigned char quote = ch; tok->f.kind = quote == '"' ? T_STRING_LITERAL @@ -402,7 +402,7 @@ void Lexer::scan_helper(Token *tok) bool doxy = false; if (_yychar == '*' || _yychar == '!') { - const char ch = _yychar; + const unsigned char ch = _yychar; yyinp(); @@ -608,7 +608,7 @@ void Lexer::scan_helper(Token *tok) ch = _yychar; yyinp(); - const char quote = ch; + const unsigned char quote = ch; tok->f.kind = quote == '"' ? T_WIDE_STRING_LITERAL |