[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55347] PVS studio static analysis report
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #55347] PVS studio static analysis report |
Date: |
Mon, 7 Jan 2019 12:27:20 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #40, bug #55347 (project octave):
@jwe: I crossed off all the bugs in lex.cc since that is an auto-generated
file, but lex.ll is a source-controlled that we own. Taking the first
warning
lex.ll (391)
V519 The 'yyg->yy_c_buf_p' variable is assigned values twice
successively.
Perhaps this is a mistake. Check lines: 391, 391.
I find the code
<COMMAND_START>(\.\.\.){ANY_EXCEPT_NL}*{NL} {
curr_lexer->lexer_debug
("<COMMAND_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");
COMMAND_ARG_FINISH;
curr_lexer->m_input_line_number++;
curr_lexer->m_current_input_column = 1;
HANDLE_STRING_CONTINUATION;
}
The macro HANDLE_STRING_CONTINUATION is
#define HANDLE_STRING_CONTINUATION \
do \
{ \
curr_lexer->decrement_promptflag (); \
curr_lexer->m_input_line_number++; \
curr_lexer->m_current_input_column = 1; \
\
if (curr_lexer->is_push_lexer ()) \
{ \
if (curr_lexer->at_end_of_buffer ()) \
return -1; \
\
if (curr_lexer->at_end_of_file ()) \
return curr_lexer->handle_end_of_input (); \
} \
} \
while (0)
I think the static analyzer is suspicious because
curr_lexer->m_input_line_number++ is being called twice in succession, as is
curr_lexer->m_current_input_column = 1;
If this is all correct (which it probably is since the parser seems to work)
then we can cross these off as false positives.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55347>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, (continued)
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Torsten, 2019/01/06
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Pavel Shlyak, 2019/01/06
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Pavel Shlyak, 2019/01/06
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/06
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Torsten, 2019/01/06
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/06
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Andreas Weber, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, John W. Eaton, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, John W. Eaton, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report,
Rik <=
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, John W. Eaton, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, John W. Eaton, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Torsten, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/07
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Rik, 2019/01/09
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, John W. Eaton, 2019/01/09
- [Octave-bug-tracker] [bug #55347] PVS studio static analysis report, Dmitri A. Sergatskov, 2019/01/09