Resolve Coverity issue with Parser::Transition's ownership of Action *.
This commit is somewhat subtle; it informs Coverity that Parser::Transition only holds an Action* temporarily, and should never create/delete one. I believe runtime checkers should also understand this OK. Signed-off-by: John Hood <cgull@glup.org>
This commit is contained in:
@@ -63,6 +63,7 @@ std::list<Parser::Action *> Parser::Parser::input( wchar_t ch )
|
||||
}
|
||||
|
||||
append_or_delete( tx.action, ret );
|
||||
tx.action = NULL;
|
||||
|
||||
if ( tx.next_state != NULL ) {
|
||||
append_or_delete( tx.next_state->enter(), ret );
|
||||
|
||||
Reference in New Issue
Block a user