[PPL-devel] [GIT] ppl/ppl(sparse_matrices): Avoid warnings about unused variables.

Enea Zaffanella zaffanella at cs.unipr.it
Sun Dec 11 23:43:54 CET 2011


Module: ppl/ppl
Branch: sparse_matrices
Commit: e5107efba63583cc504c924d01fc1acbff062822
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=e5107efba63583cc504c924d01fc1acbff062822

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Sun Dec 11 17:25:58 2011 +0100

Avoid warnings about unused variables.

---

 src/BD_Shape.templates.hh        |    3 +--
 src/Box.templates.hh             |    6 ++----
 src/Octagonal_Shape.templates.hh |    3 +--
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/BD_Shape.templates.hh b/src/BD_Shape.templates.hh
index 7f440ff..bec8372 100644
--- a/src/BD_Shape.templates.hh
+++ b/src/BD_Shape.templates.hh
@@ -3431,8 +3431,7 @@ BD_Shape<T>::refine(const Variable var,
                     const Linear_Expression& expr,
                     Coefficient_traits::const_reference denominator) {
   PPL_ASSERT(denominator != 0);
-  const dimension_type expr_space_dim = expr.space_dimension();
-  PPL_ASSERT(space_dimension() >= expr_space_dim);
+  PPL_ASSERT(space_dimension() >= expr.space_dimension());
   const dimension_type v = var.id() + 1;
   PPL_ASSERT(v <= space_dimension());
   PPL_ASSERT(expr.coefficient(var) == 0);
diff --git a/src/Box.templates.hh b/src/Box.templates.hh
index 8a8930e..4561d49 100644
--- a/src/Box.templates.hh
+++ b/src/Box.templates.hh
@@ -2144,8 +2144,7 @@ Box<ITV>::fold_space_dimensions(const Variables_Set& vars,
 template <typename ITV>
 void
 Box<ITV>::add_constraint_no_check(const Constraint& c) {
-  const dimension_type c_space_dim = c.space_dimension();
-  PPL_ASSERT(c_space_dim <= space_dimension());
+  PPL_ASSERT(c.space_dimension() <= space_dimension());
 
   dimension_type c_num_vars = 0;
   dimension_type c_only_var = 0;
@@ -2194,8 +2193,7 @@ Box<ITV>::add_constraints_no_check(const Constraint_System& cs) {
 template <typename ITV>
 void
 Box<ITV>::add_congruence_no_check(const Congruence& cg) {
-  const dimension_type cg_space_dim = cg.space_dimension();
-  PPL_ASSERT(cg_space_dim <= space_dimension());
+  PPL_ASSERT(cg.space_dimension() <= space_dimension());
 
   // Set aside the case of proper congruences.
   if (cg.is_proper_congruence()) {
diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh
index abe755c..fc0da92 100644
--- a/src/Octagonal_Shape.templates.hh
+++ b/src/Octagonal_Shape.templates.hh
@@ -4243,8 +4243,7 @@ Octagonal_Shape<T>::refine(const Variable var,
                            const Linear_Expression& expr,
                            Coefficient_traits::const_reference denominator) {
   PPL_ASSERT(denominator != 0);
-  const dimension_type expr_space_dim = expr.space_dimension();
-  PPL_ASSERT(space_dim >= expr_space_dim);
+  PPL_ASSERT(space_dim >= expr.space_dimension());
   const dimension_type var_id = var.id();
   PPL_ASSERT(var_id <= space_dim);
   PPL_ASSERT(expr.coefficient(var) == 0);




More information about the PPL-devel mailing list