[PPL-devel] [GIT] ppl/ppl(master): Avoid parameter name hiding; mark unreachable code.
Enea Zaffanella
zaffanella at cs.unipr.it
Thu Feb 18 21:55:47 CET 2010
Module: ppl/ppl
Branch: master
Commit: d274e1f6b47b8a76e0499984669d2f8ea150e36f
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=d274e1f6b47b8a76e0499984669d2f8ea150e36f
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Thu Feb 18 21:49:54 2010 +0100
Avoid parameter name hiding; mark unreachable code.
---
src/PIP_Tree.cc | 3 ++-
src/PIP_Tree.inlines.hh | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/PIP_Tree.cc b/src/PIP_Tree.cc
index 8ef8d21..d904d9e 100644
--- a/src/PIP_Tree.cc
+++ b/src/PIP_Tree.cc
@@ -2206,7 +2206,8 @@ PIP_Solution_Node::solve(const PIP_Problem& problem,
} // Main loop of the simplex algorithm
- return this;
+ // This point should be unreachable.
+ throw std::runtime_error("PPL internal error");
}
void
diff --git a/src/PIP_Tree.inlines.hh b/src/PIP_Tree.inlines.hh
index 9c86647..36f736c 100644
--- a/src/PIP_Tree.inlines.hh
+++ b/src/PIP_Tree.inlines.hh
@@ -127,8 +127,8 @@ PIP_Tree_Node::Artificial_Parameter
// Normalize if needed.
if (denominator < 0) {
neg_assign(denominator);
- Linear_Expression& expr = *this;
- expr *= -1;
+ Linear_Expression& e = *this;
+ e *= -1;
}
PPL_ASSERT(OK());
}
More information about the PPL-devel
mailing list