Commit 6982d67f authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Fix compilation Warnings with latest g++ versions.

        * apps/papers/levillain.09.ismm/graph.cc,
        * mln/canvas/browsing/diagonal2d.hh,
        * mln/morpho/watershed/topological.hh: Remove unused variable.

        * mln/canvas/labeling/sorted.hh,
        * mln/core/concept/accumulator.hh,
        * mln/core/concept/box.hh,
        * mln/core/concept/gdpoint.hh,
        * mln/core/concept/generalized_pixel.hh,
        * mln/core/concept/gpoint.hh,
        * mln/core/concept/graph.hh,
        * mln/core/concept/image.hh,
        * mln/core/concept/iterator.hh,
        * mln/core/concept/neighborhood.hh,
        * mln/core/concept/proxy.hh,
        * mln/core/concept/pseudo_site.hh,
        * mln/core/concept/site_iterator.hh,
        * mln/core/concept/site_proxy.hh,
        * mln/core/concept/site_set.hh,
        * mln/core/concept/value_iterator.hh,
        * mln/core/concept/value_set.hh,
        * mln/core/concept/weighted_window.hh,
        * mln/core/concept/window.hh,
        * mln/core/image/imorph/decorated_image.hh,
        * mln/core/internal/check/image_fastest.hh,
        * mln/core/internal/site_relative_iterator_base.hh,
        * mln/io/off/load.hh,
        * mln/io/off/save.hh,
        * mln/morpho/reconstruction/by_erosion/union_find.hh,
        * mln/topo/internal/complex_relative_iterator_base.hh,
        * tests/algebra/h_vec.cc,
        * tests/core/alias/point1d.cc,
        * tests/metal/unconst.cc,
        * tests/morpho/complex_image_wst.cc,
        * apps/papers/levillain.09.ismm/graph.cc,
        * mln/canvas/browsing/diagonal2d.hh,
        * mln/canvas/labeling/sorted.hh,
        * mln/core/concept/accumulator.hh,
        * mln/core/concept/box.hh,
        * mln/core/concept/gdpoint.hh,
        * mln/core/concept/generalized_pixel.hh,
        * mln/core/concept/gpoint.hh,
        * mln/core/concept/graph.hh,
        * mln/core/concept/image.hh,
        * mln/core/concept/iterator.hh,
        * mln/core/concept/neighborhood.hh,
        * mln/core/concept/proxy.hh,
        * mln/core/concept/pseudo_site.hh,
        * mln/core/concept/site_iterator.hh,
        * mln/core/concept/site_proxy.hh,
        * mln/core/concept/site_set.hh,
        * mln/core/concept/value_iterator.hh,
        * mln/core/concept/value_set.hh,
        * mln/core/concept/weighted_window.hh,
        * mln/core/concept/window.hh,
        * mln/core/image/imorph/decorated_image.hh,
        * mln/core/internal/check/image_fastest.hh,
        * mln/core/internal/site_relative_iterator_base.hh,
        * mln/io/off/load.hh,
        * mln/io/off/save.hh,
        * mln/morpho/reconstruction/by_erosion/union_find.hh,
        * mln/morpho/watershed/topological.hh,
        * mln/topo/internal/complex_relative_iterator_base.hh,
        * tests/algebra/h_vec.cc,
        * tests/core/alias/point1d.cc,
        * tests/metal/unconst.cc,
        * tests/morpho/complex_image_wst.cc,
        * tests/trait/super.cc: Fix unused variable warnings.
parent 520e7343
2011-11-16 Guillaume Lazzara <z@lrde.epita.fr>
Fix compilation Warnings with latest g++ versions.
* apps/papers/levillain.09.ismm/graph.cc,
* mln/canvas/browsing/diagonal2d.hh,
* mln/morpho/watershed/topological.hh: Remove unused variable.
* mln/canvas/labeling/sorted.hh,
* mln/core/concept/accumulator.hh,
* mln/core/concept/box.hh,
* mln/core/concept/gdpoint.hh,
* mln/core/concept/generalized_pixel.hh,
* mln/core/concept/gpoint.hh,
* mln/core/concept/graph.hh,
* mln/core/concept/image.hh,
* mln/core/concept/iterator.hh,
* mln/core/concept/neighborhood.hh,
* mln/core/concept/proxy.hh,
* mln/core/concept/pseudo_site.hh,
* mln/core/concept/site_iterator.hh,
* mln/core/concept/site_proxy.hh,
* mln/core/concept/site_set.hh,
* mln/core/concept/value_iterator.hh,
* mln/core/concept/value_set.hh,
* mln/core/concept/weighted_window.hh,
* mln/core/concept/window.hh,
* mln/core/image/imorph/decorated_image.hh,
* mln/core/internal/check/image_fastest.hh,
* mln/core/internal/site_relative_iterator_base.hh,
* mln/io/off/load.hh,
* mln/io/off/save.hh,
* mln/morpho/reconstruction/by_erosion/union_find.hh,
* mln/topo/internal/complex_relative_iterator_base.hh,
* tests/algebra/h_vec.cc,
* tests/core/alias/point1d.cc,
* tests/metal/unconst.cc,
* tests/morpho/complex_image_wst.cc,
* apps/papers/levillain.09.ismm/graph.cc,
* mln/canvas/browsing/diagonal2d.hh,
* mln/canvas/labeling/sorted.hh,
* mln/core/concept/accumulator.hh,
* mln/core/concept/box.hh,
* mln/core/concept/gdpoint.hh,
* mln/core/concept/generalized_pixel.hh,
* mln/core/concept/gpoint.hh,
* mln/core/concept/graph.hh,
* mln/core/concept/image.hh,
* mln/core/concept/iterator.hh,
* mln/core/concept/neighborhood.hh,
* mln/core/concept/proxy.hh,
* mln/core/concept/pseudo_site.hh,
* mln/core/concept/site_iterator.hh,
* mln/core/concept/site_proxy.hh,
* mln/core/concept/site_set.hh,
* mln/core/concept/value_iterator.hh,
* mln/core/concept/value_set.hh,
* mln/core/concept/weighted_window.hh,
* mln/core/concept/window.hh,
* mln/core/image/imorph/decorated_image.hh,
* mln/core/internal/check/image_fastest.hh,
* mln/core/internal/site_relative_iterator_base.hh,
* mln/io/off/load.hh,
* mln/io/off/save.hh,
* mln/morpho/reconstruction/by_erosion/union_find.hh,
* mln/morpho/watershed/topological.hh,
* mln/topo/internal/complex_relative_iterator_base.hh,
* tests/algebra/h_vec.cc,
* tests/core/alias/point1d.cc,
* tests/metal/unconst.cc,
* tests/morpho/complex_image_wst.cc,
* tests/trait/super.cc: Fix unused variable warnings.
2011-10-28 Guillaume Lazzara <z@lrde.epita.fr>
 
* mln/core/image/dmorph/slice_image.hh: Add operator=() for
......@@ -189,10 +189,8 @@ namespace mln
// Adjacent vertices.
adj_v.start();
topo::face<1> v1 = adj_v.unproxy_().face();
point2d p1 = adj_v.to_site().front();
adj_v.next();
topo::face<1> v2 = adj_v.unproxy_().face();
point2d p2 = adj_v.to_site().front();
adj_v.next();
mln_invariant(!adj_v.is_valid());
......@@ -279,10 +277,8 @@ namespace mln
// Adjacent vertices.
adj_v.start();
topo::face<1> v1 = adj_v.unproxy_().face();
point2d p1 = adj_v.to_site().front();
adj_v.next();
topo::face<1> v2 = adj_v.unproxy_().face();
point2d p2 = adj_v.to_site().front();
adj_v.next();
mln_invariant(!adj_v.is_valid());
......
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -115,8 +115,7 @@ namespace mln
mln_deduce(I, psite, delta) diag;
psite
pmin = f.input.domain().pmin(),
pmax = f.input.domain().pmax();
pmin = f.input.domain().pmin();
f.p = pmin;
......
......@@ -96,7 +96,7 @@ namespace mln
// Output.
mln_ch_value(I, L) output;
bool status;
bool status; // FIXME: Is-it useful?
// Initialization.
{
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -162,19 +163,19 @@ namespace mln
typedef mln_q_result(E) q_result;
void (E::*m1)() = & E::init;
m1 = 0;
(void) m1;
void (E::*m2)(const argument&) = & E::take;
m2 = 0;
(void) m2;
void (E::*m3)(const E&) = & E::take;
m3 = 0;
(void) m3;
q_result (E::*m4)() const = & E::to_result;
m4 = 0;
(void) m4;
q_result (E::*m5)() const = & E::operator q_result;
m5 = 0;
(void) m5;
bool (E::*m6)() const = & E::is_valid;
m6 = 0;
(void) m6;
}
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -142,9 +143,9 @@ namespace mln
{
typedef mln_site(E) site;
site (E::*m1)() const = & E::pmin;
m1 = 0;
(void) m1;
site (E::*m2)() const = & E::pmax;
m2 = 0;
(void) m2;
}
template <typename E>
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -166,7 +167,7 @@ namespace mln
typedef mln_grid(E) grid;
typedef mln_vec(E) vec;
vec (E::*m)() const = & E::to_vec;
m = 0;
(void) m;
}
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -83,15 +84,15 @@ namespace mln
typedef mln_rvalue(E) rvalue;
rvalue (E::*m1)() const = & E::val;
m1 = 0;
(void) m1;
typedef mln_image(E) image;
// FIXME: check "without &"
image& (E::*m2)() const = & E::ima;
m2 = 0;
(void) m2;
mln_qlf_value(image)** (E::*m3)() const = & E::address_;
m3 = 0;
(void ) m3;
}
# endif // ! MLN_INCLUDE_ONLY
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -302,7 +303,7 @@ namespace mln
typedef mln_delta(E) delta;
typedef mln_vec(E) vec;
vec (E::*m)() const = & E::to_vec;
m = 0;
(void) m;
}
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -113,38 +113,38 @@ namespace mln
// Check methods
const void* (E::*m1)() const = & E::id;
m1 = 0;
(void) m1;
util::vertex_id_t (E::*m2)(const util::edge_id_t& id_e, const util::vertex_id_t& id_v) const = & E::v_other;
m2 = 0;
(void) m2;
size_t (E::*m4)() const = & E::v_nmax;
m4 = 0;
(void) m4;
bool (E::*m5)(const util::vertex_id_t& id_v) const = & E::has_v;
m5 = 0;
(void) m5;
size_t (E::*m6)(const util::vertex_id_t& id_v) const = & E::v_nmax_nbh_edges;
m6 = 0;
(void) m6;
util::edge_id_t (E::*m7)(const util::vertex_id_t& id_v, unsigned i) const = & E::v_ith_nbh_edge;
m7 = 0;
(void) m7;
size_t (E::*m8)() const = & E::e_nmax;
m8 = 0;
(void) m8;
bool (E::*m9)(const util::edge_id_t& id_e) const = & E::has_e;
m9 = 0;
(void) m9;
util::vertex_id_t (E::*m10)(const util::edge_id_t& id_e) const = & E::v1;
m10 = 0;
(void) m10;
util::vertex_id_t (E::*m11)(const util::edge_id_t& id_e) const = & E::v2;
m11 = 0;
(void) m11;
size_t (E::*m12)(const util::edge_id_t& id_e) const = & E::e_nmax_nbh_edges;
m12 = 0;
(void) m12;
util::edge_id_t (E::*m13)(const util::edge_id_t& id_e, unsigned i) const = & E::e_ith_nbh_edge;
m13 = 0;
(void) m13;
bool (E::*m14)() const = & E::is_valid;
m14 = 0;
(void) m14;
void (E::*m15)() = & E::invalidate;
m15 = 0;
(void) m15;
//FIXME: enable this test. Currently does not work because this is
// a templated method.
//bool (E::*m14)(...) = & E::is_subgraph_of;
//m14 = 0;
//(void) m14;
}
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -216,24 +216,24 @@ namespace mln
typedef mln_bkd_piter(E) bkd_piter;
bool (E::*m1)(const psite& p) const = & E::has;
m1 = 0;
(void) m1;
// Only some image types feature the 'nsites' method.
// unsigned (E::*m2)() const = & E::nsites;
// m2 = 0;
// (void) m2;
bool (E::*m3)() const = & E::is_valid;
m3 = 0;
(void) m3;
typedef typename E::t_eligible_values_set t_eligible_values_set;
const t_eligible_values_set& (E::*m4)() const = & E::values_eligible;
m4 = 0;
(void) m4;
typedef typename E::t_values_space t_values_space;
const t_values_space& (E::*m5)() const = & E::values_space;
m5 = 0;
(void) m5;
// to be provided in concrete image classes:
......@@ -246,15 +246,16 @@ namespace mln
// FIXME Doc
//typedef mln_vset(E) vset;
//const vset& (E::*m5)() const = & E::values;
//m5 = 0;
//(void) m5;
rvalue (E::*m6)(const psite& p) const = & E::operator();
m6 = 0;
(void) m6;
lvalue (E::*m7)(const psite& p) = & E::operator();
m7 = 0;
(void) m7;
const domain_t& (E::*m8)() const = & E::domain;
m8 = 0;
(void) m8;
typedef typename E::skeleton skeleton;
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -110,13 +111,13 @@ namespace mln
Iterator<E>::Iterator()
{
bool (E::*m1)() const = & E::is_valid;
m1 = 0;
(void) m1;
void (E::*m2)() = & E::invalidate;
m2 = 0;
(void) m2;
void (E::*m3)() = & E::start;
m3 = 0;
(void) m3;
void (E::*m4)() = & E::next_;
m4 = 0;
(void) m4;
}
# endif // ! MLN_INCLUDE_ONLY
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -121,16 +122,16 @@ namespace mln
typedef mln_window(E) window;
bool m = (& E::win) == (& E::win);
m = 0;
(void) m;
bool (E::*m2)() const = &E::is_valid;
m2 = 0;
(void) m2;
# if 0
/* FIXME: Disabled, as win() can either return a const reference
or a copy of the window (see documentation above). Hence the
simpler, relaxed check above (m0). */
const window& (E::*m1)() const = & E::win;
m = m1;
(void) m1;
# endif
}
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -331,7 +332,7 @@ namespace mln
typedef typename E::q_subject q_subject;
q_subject (E::*m_)() = & E::subj_;
m_ = 0;
(void) m_;
}
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -98,9 +99,9 @@ namespace mln
typedef mln_target(E) target;
void (E::*m1)(const target&) = & E::change_target;
m1 = 0;
(void) m1;
const target* (E::*m2)() const = & E::target_;
m2 = 0;
(void) m2;
}
template <typename E>
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -131,17 +132,17 @@ namespace mln
Site_Iterator<E>::Site_Iterator()
{
bool m0 = (& E::target_) == (& E::target_); // FIXME: Find a better test.
m0 = 0;
(void) m0;
bool (E::*m1)() const = & E::is_valid_;
m1 = 0;
(void) m1;
void (E::*m2)() = & E::invalidate_;
m2 = 0;
(void) m2;
void (E::*m3)() = & E::start_;
m3 = 0;
(void) m3;
void (E::*m4)() = & E::next_;
m4 = 0;
(void) m4;
bool m5 = (& E::change_target) == (& E::change_target);
m5 = 0;
(void) m5;
}
# endif // ! MLN_INCLUDE_ONLY
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -82,11 +83,11 @@ namespace mln
typedef mln_site(E) site;
const site& (E::*m1)() const = & E::to_site;
m1 = 0;
(void) m1;
// De-activate because sometimes it returns a "const site&"...
// site (E::*m2)() const = & E::operator site;
// m2 = 0;
// (void) m2;
}
# endif // ! MLN_INCLUDE_ONLY
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -185,7 +186,7 @@ namespace mln
static void run()
{
unsigned (E::*m)() const = & E::nsites;
m = 0;
(void) m;
}
};
......@@ -198,7 +199,7 @@ namespace mln
{
typedef typename E::q_box q_box;
q_box (E::*m)() const = & E::bbox;
m = 0;
(void) m;
}
};
......@@ -227,9 +228,9 @@ namespace mln
typedef typename E::i_element i_element;
mlc_equal(mlc_unqualif(i_element), i_element)::check();
void (E::*m1)(const i_element&) = & E::insert;
m1 = 0;
(void) m1;
void (E::*m2)() = & E::clear;
m2 = 0;
(void) m2;
}
};
......@@ -241,13 +242,13 @@ namespace mln
typedef typename E::i_element i_element;
mlc_equal(mlc_unqualif(i_element), i_element)::check();
void (E::*m1)(const i_element&) = & E::insert;
m1 = 0;
(void) m1;
typedef typename E::r_element r_element;
mlc_equal(mlc_unqualif(r_element), r_element)::check();
void (E::*m2)(const r_element&) = & E::remove;
m2 = 0;
(void) m2;
void (E::*m3)() = & E::clear;
m3 = 0;
(void) m3;
}
};
......@@ -280,11 +281,11 @@ namespace mln
// Check methods.
bool (E::*m1)(const psite& p) const = & E::has;
m1 = 0;
(void) m1;
bool (E::*m2)() const = & E::is_valid;
m2 = 0;
(void) m2;
std::size_t (E::*m3)() const = & E::memory_size;
m3 = 0;
(void) m3;
// Check methods depending upon properties.
internal::site_set_nsites_check < mln_trait_site_set_nsites(E), E >::run();
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -84,7 +85,7 @@ namespace mln
{
typedef mln_value(E) value;
value (E::*m)() const = & E::operator value;
m = 0;
(void) m;
}
template <typename E>
......
// Copyright (C) 2007, 2009, 2010 EPITA Research and Development
// Copyright (C) 2007, 2009, 2010, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -91,11 +91,11 @@ namespace mln
typedef mln_bkd_viter(E) bkd_viter;
bool (E::*m1)(const value&) const = & E::has;
m1 = 0;
(void) m1;
value (E::*m2)(unsigned) const = & E::operator[];
m2 = 0;
(void) m2;
unsigned (E::*m3)() const = & E::nvalues;
m3 = 0;
(void) m3;
}
template <typename E>
......