Mercurial > octave
diff libinterp/parse-tree/lex.ll @ 26450:af7faef288ad stable
lex.ll: Fix static analyzer detected issues (bug #55347).
* lex.ll: Use "unsigned int" as the correct resulting variable for "%o" and
"%x" sscanf conversions.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 05 Jan 2019 07:28:53 -0800 |
parents | 00f796120a6d |
children | 7647b82f921b |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Sat Jan 05 07:08:49 2019 -0800 +++ b/libinterp/parse-tree/lex.ll Sat Jan 05 07:28:53 2019 -0800 @@ -858,7 +858,7 @@ curr_lexer->m_current_input_column += yyleng; - int result; + unsigned int result; sscanf (yytext+1, "%o", &result); if (result > 0xff) @@ -882,7 +882,7 @@ curr_lexer->m_current_input_column += yyleng; - int result; + unsigned int result; sscanf (yytext+2, "%x", &result); // Truncate the value silently instead of checking the range like