Bug 1158896 - prevent dead code from being generated in lower.py; r=bent

Coverity was complaining that we have things like:

    if ((!(actor))) {
        return false;
    }

    if ((!(actor))) {
        return false;
    }

in the generated code, as the second return will clearly never be hit.  To
address this, let's remove a redundant call to dtorPrologue.
This commit is contained in:
Nathan Froyd 2015-04-27 13:08:12 -04:00
parent 050302155b
commit 1bcb2521b7

View File

@ -4972,7 +4972,6 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
actorvar = actor.var() actorvar = actor.var()
method = MethodDefn(self.makeDtorMethodDecl(md)) method = MethodDefn(self.makeDtorMethodDecl(md))
method.addstmts(self.dtorPrologue(actor.var()))
method.addstmts(self.dtorPrologue(actorvar)) method.addstmts(self.dtorPrologue(actorvar))
msgvar, stmts = self.makeMessage(md, errfnSendDtor, actorvar) msgvar, stmts = self.makeMessage(md, errfnSendDtor, actorvar)