[PPL-devel] [GIT] ppl/ppl(master): Fixed some warnings.
Abramo Bagnara
abramo.bagnara at gmail.com
Mon Jun 6 16:35:04 CEST 2011
Module: ppl/ppl
Branch: master
Commit: 15650222d5358a202411066142ab134b03cbea1e
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=15650222d5358a202411066142ab134b03cbea1e
Author: Abramo Bagnara <abramo.bagnara at gmail.com>
Date: Mon Jun 6 16:34:59 2011 +0200
Fixed some warnings.
---
src/Grid_public.cc | 6 +++---
src/Interval.inlines.hh | 13 ++++++-------
src/Interval.templates.hh | 8 ++++----
src/wrap_assign.hh | 2 +-
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/Grid_public.cc b/src/Grid_public.cc
index 47b8437..82e64a3 100644
--- a/src/Grid_public.cc
+++ b/src/Grid_public.cc
@@ -2735,7 +2735,7 @@ PPL::Grid::wrap_assign(const Variables_Set& vars,
PPL_DIRTY_TEMP_COEFFICIENT(v_n);
PPL_DIRTY_TEMP_COEFFICIENT(v_d);
for (Variables_Set::const_iterator i = vars.begin(),
- vars_end = vars.end(); i != vars.end(); ++i) {
+ vars_end = vars.end(); i != vars_end; ++i) {
const Variable x = Variable(*i);
// Find the frequency and a value for `x' in `gr'.
if (!gr.frequency_no_check(x, f_n, f_d, v_n, v_d))
@@ -2817,7 +2817,7 @@ PPL::Grid::wrap_assign(const Variables_Set& vars,
max_value *= div;
min_value *= div;
for (Variables_Set::const_iterator i = vars.begin(),
- vars_end = vars.end(); i != vars.end(); ++i) {
+ vars_end = vars.end(); i != vars_end; ++i) {
const Variable x = Variable(*i);
if (!gr.bounds_no_check(x)) {
// `x' is not a constant in `gr'.
@@ -2886,7 +2886,7 @@ PPL::Grid::drop_some_non_integer_points(const Variables_Set& vars,
// in vars. All points in \p *this with non-integral coordinates for
// the dimensions in vars are removed.
for (Variables_Set::const_iterator i = vars.begin(),
- vars_end = vars.end(); i != vars.end(); ++i)
+ vars_end = vars.end(); i != vars_end; ++i)
add_congruence(Variable(*i) %= 0);
PPL_ASSERT(OK());
diff --git a/src/Interval.inlines.hh b/src/Interval.inlines.hh
index 2fdba70..85cc815 100644
--- a/src/Interval.inlines.hh
+++ b/src/Interval.inlines.hh
@@ -352,13 +352,12 @@ Interval<To_Boundary, To_Info>::intersect_assign(const From1& x,
to_info.clear();
if (!intersect_restriction(to_info, x, y))
return assign(EMPTY);
- Result rl, ru;
- rl = max_assign(LOWER, lower(), to_info,
- LOWER, f_lower(x), f_info(x),
- LOWER, f_lower(y), f_info(y));
- ru = min_assign(UPPER, upper(), to_info,
- UPPER, f_upper(x), f_info(x),
- UPPER, f_upper(y), f_info(y));
+ max_assign(LOWER, lower(), to_info,
+ LOWER, f_lower(x), f_info(x),
+ LOWER, f_lower(y), f_info(y));
+ min_assign(UPPER, upper(), to_info,
+ UPPER, f_upper(x), f_info(x),
+ UPPER, f_upper(y), f_info(y));
assign_or_swap(info(), to_info);
PPL_ASSERT(OK());
return I_NOT_EMPTY;
diff --git a/src/Interval.templates.hh b/src/Interval.templates.hh
index 9f83797..50a1f0c 100644
--- a/src/Interval.templates.hh
+++ b/src/Interval.templates.hh
@@ -37,6 +37,8 @@ Interval<Boundary, Info>::lower_extend(const C& c) {
switch (c.rel()) {
case V_LGE:
return lower_extend();
+ default:
+ PPL_ASSERT(false);
case V_NAN:
return I_NOT_EMPTY | I_EXACT | I_UNCHANGED;
case V_GT:
@@ -46,8 +48,6 @@ Interval<Boundary, Info>::lower_extend(const C& c) {
case V_EQ:
open = false;
break;
- default:
- PPL_ASSERT(false);
}
min_assign(LOWER, lower(), info(), LOWER, c.value(), f_info(c.value(), open));
PPL_ASSERT(OK());
@@ -63,6 +63,8 @@ Interval<Boundary, Info>::upper_extend(const C& c) {
switch (c.rel()) {
case V_LGE:
return lower_extend();
+ default:
+ PPL_ASSERT(false);
case V_NAN:
return I_NOT_EMPTY | I_EXACT | I_UNCHANGED;
case V_LT:
@@ -72,8 +74,6 @@ Interval<Boundary, Info>::upper_extend(const C& c) {
case V_EQ:
open = false;
break;
- default:
- PPL_ASSERT(false);
}
max_assign(UPPER, upper(), info(), UPPER, c.value(), f_info(c.value(), open));
PPL_ASSERT(OK());
diff --git a/src/wrap_assign.hh b/src/wrap_assign.hh
index cbddcd3..1c54cc0 100644
--- a/src/wrap_assign.hh
+++ b/src/wrap_assign.hh
@@ -124,7 +124,7 @@ wrap_assign_col(PSET& dest,
if (pcs != 0)
p.refine_with_constraints(*pcs);
for (Variables_Set::const_iterator i = vars.begin(),
- vars_end = vars.end(); i != vars.end(); ++i) {
+ vars_end = vars.end(); i != vars_end; ++i) {
const Variable x = Variable(*i);
p.refine_with_constraint(min_value <= x);
p.refine_with_constraint(x <= max_value);
More information about the PPL-devel
mailing list