Commit 812809e6 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Fix warnings with Clang/g++ 4.6.x

	* mln/border/duplicate.hh,
	* mln/border/mirror.hh,
	* mln/canvas/browsing/internal/graph_first_search.hh,
	* mln/convert/impl/from_float_to_value.hh,
	* mln/convert/to_qimage.hh,
	* mln/core/image/complex_window_piter.hh,
	* mln/extension/fill.hh,
	* mln/fun/spe/binary.hh,
	* mln/fun/spe/unary.hh,
	* mln/fun/x2x/rotation.hh,
	* mln/io/fld/max_components.hh,
	* mln/labeling/flat_zones.hh,
	* mln/labeling/value.hh,
	* mln/morpho/reconstruction/by_dilation/union_find.hh,
	* mln/opt/element.hh,
	* mln/registration/get_rot.hh,
	* mln/subsampling/antialiased.hh,
	* mln/subsampling/gaussian_subsampling.hh,
	* mln/topo/skeleton/is_simple_point.hh,
	* mln/transform/influence_zone_geodesic.hh,
	* mln/util/object_id.hh,
	* mln/value/lut_vec.hh,
	* mln/world/binary_2d/enlarge.hh: Avoid unused variable warnings.

	* mln/accu/internal/couple.hh,
	* mln/convert/from_to.hxx,
	* mln/core/faces_psite.hh,
	* mln/core/image/ch_piter.hh,
	* mln/core/image/dmorph/extended.hh,
	* mln/core/image/dmorph/extension_fun.hh,
	* mln/core/image/dmorph/extension_ima.hh,
	* mln/core/image/dmorph/extension_val.hh,
	* mln/core/image/dmorph/hexa.hh,
	* mln/core/image/dmorph/sub_image_if.hh,
	* mln/core/image/dmorph/transformed_image.hh,
	* mln/core/image/flat_image.hh,
	* mln/core/image/graph_elt_mixed_window.hh,
	* mln/core/image/graph_elt_window.hh,
	* mln/core/image/graph_elt_window_if.hh,
	* mln/core/image/graph_window_piter.hh,
	* mln/core/image/image2d.hh,
	* mln/core/image/imorph/labeled_image.hh,
	* mln/core/image/imorph/plain.hh,
	* mln/core/image/imorph/safe.hh,
	* mln/core/image/vmorph/cast_image.hh,
	* mln/core/image/vmorph/fun_image.hh,
	* mln/core/image/vmorph/thru_image.hh,
	* mln/core/image/vmorph/thrubin_image.hh,
	* mln/core/image/vmorph/violent_cast_image.hh,
	* mln/core/internal/is_masked_impl_selector.hh,
	* mln/core/internal/pixel_impl.hh,
	* mln/core/routine/init.hxx,
	* mln/core/site_set/attic/p_faces_piter.hh,
	* mln/core/site_set/p_faces.hh,
	* mln/core/site_set/p_if.hh,
	* mln/core/site_set/p_transformed.hh,
	* mln/debug/println.spe.hh,
	* mln/io/pbm/save.hh,
	* mln/io/pgm/save.hh,
	* mln/morpho/attribute/height.hh,
	* mln/morpho/attribute/sharpness.hh,
	* mln/morpho/attribute/volume.hh,
	* mln/morpho/tree/data.hh,
	* mln/topo/center_only_iter.hh,
	* mln/topo/face.hh,
	* mln/topo/face_data.hh,
	* mln/trait/image_from_grid.hh,
	* mln/trait/images.hh,
	* mln/value/float01.hh,
	* mln/value/float01_f.hh,
	* mln/value/graylevel.hh,
	* mln/value/graylevel_f.hh,
	* mln/value/internal/gray_.hh,
	* mln/value/internal/gray_f.hh: Make forward declarations
	consistent with declarations.

	* mln/core/concept/box.hh,
	* mln/core/dpoints_pixter.hh,
	* mln/core/image/graph_window_if_piter.hh: Add explicit 'this'.

	* mln/data/fill.hh: Make sure declarations are made before use.

	* mln/geom/chamfer.hh,
	* mln/morpho/tree/compute_attribute_image.hh: Do not set default
	argument values in declaration.

	* mln/accu/line.hh: Use def::coord.

	* mln/algebra/vec.hh,
	* mln/convert/from_to.hxx,
	* mln/core/image/dmorph/sub_image.hh,
	* mln/core/internal/site_set_iterator_base.hh,
	* mln/core/site_set/box.hh,
	* mln/core/site_set/p_array.hh,
	* mln/core/site_set/p_edges.hh,
	* mln/core/site_set/p_vertices.hh: Make forward declaration
	consistent with declaration.

	* mln/value/builtin/carrays.hh: Explicitly convert to char *.

	* mln/convert/impl/from_double_to_value.hh,
	* mln/convert/impl/from_int_to_value.hh,
	* mln/core/point.hh,
	* mln/opt/element.hh: Avoid unused variable warning.

	* mln/convert/impl/from_image_to_site_set.hh: Remove useless local variable.
parent 8f46b1c9
......@@ -19,6 +19,117 @@
* mln/io/dicom/load.hh: Fix invalid data while loading large
image.
 
2011-04-28 Guillaume Lazzara <lazzara@fidji.lrde.epita.fr>
Fix warnings with Clang/g++ 4.6.x
* mln/border/duplicate.hh,
* mln/border/mirror.hh,
* mln/canvas/browsing/internal/graph_first_search.hh,
* mln/convert/impl/from_float_to_value.hh,
* mln/convert/to_qimage.hh,
* mln/core/image/complex_window_piter.hh,
* mln/extension/fill.hh,
* mln/fun/spe/binary.hh,
* mln/fun/spe/unary.hh,
* mln/fun/x2x/rotation.hh,
* mln/io/fld/max_components.hh,
* mln/labeling/flat_zones.hh,
* mln/labeling/value.hh,
* mln/morpho/reconstruction/by_dilation/union_find.hh,
* mln/opt/element.hh,
* mln/registration/get_rot.hh,
* mln/subsampling/antialiased.hh,
* mln/subsampling/gaussian_subsampling.hh,
* mln/topo/skeleton/is_simple_point.hh,
* mln/transform/influence_zone_geodesic.hh,
* mln/util/object_id.hh,
* mln/value/lut_vec.hh,
* mln/world/binary_2d/enlarge.hh: Avoid unused variable warnings.
* mln/accu/internal/couple.hh,
* mln/convert/from_to.hxx,
* mln/core/faces_psite.hh,
* mln/core/image/ch_piter.hh,
* mln/core/image/dmorph/extended.hh,
* mln/core/image/dmorph/extension_fun.hh,
* mln/core/image/dmorph/extension_ima.hh,
* mln/core/image/dmorph/extension_val.hh,
* mln/core/image/dmorph/hexa.hh,
* mln/core/image/dmorph/sub_image_if.hh,
* mln/core/image/dmorph/transformed_image.hh,
* mln/core/image/flat_image.hh,
* mln/core/image/graph_elt_mixed_window.hh,
* mln/core/image/graph_elt_window.hh,
* mln/core/image/graph_elt_window_if.hh,
* mln/core/image/graph_window_piter.hh,
* mln/core/image/image2d.hh,
* mln/core/image/imorph/labeled_image.hh,
* mln/core/image/imorph/plain.hh,
* mln/core/image/imorph/safe.hh,
* mln/core/image/vmorph/cast_image.hh,
* mln/core/image/vmorph/fun_image.hh,
* mln/core/image/vmorph/thru_image.hh,
* mln/core/image/vmorph/thrubin_image.hh,
* mln/core/image/vmorph/violent_cast_image.hh,
* mln/core/internal/is_masked_impl_selector.hh,
* mln/core/internal/pixel_impl.hh,
* mln/core/routine/init.hxx,
* mln/core/site_set/attic/p_faces_piter.hh,
* mln/core/site_set/p_faces.hh,
* mln/core/site_set/p_if.hh,
* mln/core/site_set/p_transformed.hh,
* mln/debug/println.spe.hh,
* mln/io/pbm/save.hh,
* mln/io/pgm/save.hh,
* mln/morpho/attribute/height.hh,
* mln/morpho/attribute/sharpness.hh,
* mln/morpho/attribute/volume.hh,
* mln/morpho/tree/data.hh,
* mln/topo/center_only_iter.hh,
* mln/topo/face.hh,
* mln/topo/face_data.hh,
* mln/trait/image_from_grid.hh,
* mln/trait/images.hh,
* mln/value/float01.hh,
* mln/value/float01_f.hh,
* mln/value/graylevel.hh,
* mln/value/graylevel_f.hh,
* mln/value/internal/gray_.hh,
* mln/value/internal/gray_f.hh: Make forward declarations
consistent with declarations.
* mln/core/concept/box.hh,
* mln/core/dpoints_pixter.hh,
* mln/core/image/graph_window_if_piter.hh: Add explicit 'this'.
* mln/data/fill.hh: Make sure declarations are made before use.
* mln/geom/chamfer.hh,
* mln/morpho/tree/compute_attribute_image.hh: Do not set default
argument values in declaration.
* mln/accu/line.hh: Use def::coord.
* mln/algebra/vec.hh,
* mln/convert/from_to.hxx,
* mln/core/image/dmorph/sub_image.hh,
* mln/core/internal/site_set_iterator_base.hh,
* mln/core/site_set/box.hh,
* mln/core/site_set/p_array.hh,
* mln/core/site_set/p_edges.hh,
* mln/core/site_set/p_vertices.hh: Make forward declaration
consistent with declaration.
* mln/value/builtin/carrays.hh: Explicitly convert to char *.
* mln/convert/impl/from_double_to_value.hh,
* mln/convert/impl/from_int_to_value.hh,
* mln/core/point.hh,
* mln/opt/element.hh: Avoid unused variable warning.
* mln/convert/impl/from_image_to_site_set.hh: Remove useless local variable.
2010-12-10 Roland Levillain <roland@lrde.epita.fr>
 
Ensure non implemented reconstructions on sets abort at run time.
......@@ -53,10 +53,11 @@ namespace mln
///
/// \todo Check that, when T is not provided, A1 and A2 have the same value.
template <typename A1, typename A2, typename R, typename E>
struct couple
: base<R,E>,
mlc_equal(mln_argument(A1), mln_argument(A2))::check_t
class couple
: public base<R,E>,
public mlc_equal(mln_argument(A1), mln_argument(A2))::check_t
{
public:
typedef mln_argument(A1) argument;
/// Manipulators.
......
// 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.
//
......@@ -63,8 +64,8 @@ namespace mln
typename I, typename O>
void
line(const Image<I>& input,
const mln_site(I)& p_start, unsigned len,
unsigned half_length,
const mln_site(I)& p_start, def::coord len,
def::coord half_length,
Image<O>& output);
......@@ -98,7 +99,7 @@ namespace mln
mln_precondition(input.is_valid());
mln_precondition(output.is_valid());
}
} // end of namespace mln::accu::internal
......@@ -107,7 +108,7 @@ namespace mln
namespace generic
{
template <typename Meta_Accu, unsigned Dir,
typename I, typename O>
void
......@@ -212,8 +213,8 @@ namespace mln
typename I, typename O>
void
line_fastest(const Image<I>& input_,
const mln_site(I)& p_start, unsigned len,
unsigned half_length,
const mln_site(I)& p_start, def::coord len,
def::coord half_length,
Image<O>& output_)
{
typedef mln_site(I) P;
......@@ -371,7 +372,7 @@ namespace mln
half_length,
output);
}
} // end of namespace mln::accu::internal
......
// Copyright (C) 2006, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2006, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -55,7 +56,7 @@ namespace mln
// Forward declarations.
namespace algebra {
template <unsigned n, typename T> class vec;
template <unsigned d, typename C> class h_vec;
template <unsigned d, typename C> struct h_vec;
template <unsigned n, unsigned m, typename T> class mat;
}
......
// 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.
//
......@@ -227,6 +228,7 @@ namespace mln
void duplicate_dispatch_on(trait::image::speed::any,
const Image<I>& ima)
{
(void) ima;
// No-op.
}
......
......@@ -199,7 +199,8 @@ namespace mln
{
trace::warning("border::mirror for 3D image is not implemented,"
" so image borders have not been mirrored!");
mln::internal::fixme();
(void) ima;
// FIXME write it!
}
......
......@@ -63,13 +63,13 @@ namespace mln
template <typename D> class neighb;
template <typename D> class window;
template <typename D, typename W> class w_window;
template <typename D, typename W> struct w_window;
template <typename T> struct image1d;
namespace algebra {
template <unsigned n, typename T> class vec;
template <unsigned d, typename C> class h_vec;
template <unsigned d, typename C> struct h_vec;
}
namespace fun {
......
// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -86,9 +87,11 @@ namespace mln
template <typename V>
inline
void
from_double_to_value(const double& /* from */,
Value<V>& /* to */)
from_double_to_value(const double& from,
Value<V>& to)
{
(void) from;
(void) to;
mlc_abort(V)::check();
}
......
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Copyright (C) 2008, 2009, 2010, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -87,9 +87,11 @@ namespace mln
template <typename V>
inline
void
from_float_to_value(const float& /* from */,
Value<V>& /* to */)
from_float_to_value(const float& from,
Value<V>& to)
{
(void) from;
(void) to;
mlc_abort(V)::check();
}
......
// 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.
//
......@@ -107,7 +108,6 @@ namespace mln
const std::pair< mln_value(I), p_run<P> >&)
{
s.clear();
mln_value(I) O = literal::zero;
mln_fwd_piter(I) p(input.domain());
p.start();
for (;;)
......
......@@ -74,9 +74,11 @@ namespace mln
template <typename V>
inline
void
from_int_to_value(const int& /* from */,
Value<V>& /* to */)
from_int_to_value(const int& from,
Value<V>& to)
{
(void) from;
(void) to;
mlc_abort(V)::check();
}
......
......@@ -254,6 +254,8 @@ namespace mln
inline
QImage to_qimage_dispatch(const Image<I>& ima, V&)
{
(void) ima;
// Not supported yet!
mlc_abort(I)::check();
return QImage();
......
......@@ -132,7 +132,8 @@ namespace mln
{
return
exact(this)->is_valid()
? 1 + exact(this)->pmax()[i] - exact(this)->pmin()[i]
? static_cast<unsigned>(1 + exact(this)->pmax()[i]
- exact(this)->pmin()[i])
: 0u;
}
......
// 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.
//
......@@ -27,7 +28,7 @@
# define MLN_CORE_DPOINTS_PIXTER_HH
/// \file
///
///
/// \brief Definition of forward and backward mln::dpoint-based
/// iterators for pixels iterations.
///
......@@ -51,7 +52,7 @@ namespace mln
/// \brief A generic forward iterator on the pixels of a
/// dpoint-based window or neighborhood.
///
///
/// Parameter \c I is the image type.
template <typename I>
class dpoints_fwd_pixter
......@@ -62,7 +63,7 @@ namespace mln
public:
/// \brief Constructor (using an image).
///
///
/// \param[in] image The image to iterate over.
/// \param[in] dps An object (neighborhood or window) that can
/// provide a set of delta-points.
......@@ -74,7 +75,7 @@ namespace mln
const Pref& p_ref);
/// \brief Constructor (using a generalized pixel).
///
///
/// \param[in] pxl_ref Center (generalized) pixel to iterate around.
/// \param[in] dps An object (neighborhood or window) that can
/// provide a set of delta-points.
......@@ -134,7 +135,7 @@ namespace mln
/// \brief A generic backward iterator on the pixels of a
/// dpoint-based window or neighborhood.
///
///
/// Parameter \c I is the image type.
template <typename I>
class dpoints_bkd_pixter
......@@ -145,7 +146,7 @@ namespace mln
public:
/// \brief Constructor (using an image).
///
///
/// \param[in] image The image to iterate over.
/// \param[in] dps An object (neighborhood or window) that can
/// provide a set of delta-points.
......@@ -157,7 +158,7 @@ namespace mln
const Pref& p_ref);
/// \brief Constructor (using a generalized pixel).
///
///
/// \param[in] pxl_ref Center (generalized) pixel to iterate around.
/// \param[in] dps An object (neighborhood or window) that can
/// provide a set of delta-points.
......@@ -257,7 +258,7 @@ namespace mln
{
mln_invariant(value_ref_ != 0 || p_ref_ != 0);
if (p_ref_)
return image_(*p_ref_);
return this->image_(*p_ref_);
else
return **value_ref_;
}
......@@ -286,7 +287,7 @@ namespace mln
if (is_valid())
{
if (p_ref_)
this->value_ptr_ = & image_(*p_ref_) + *i_;
this->value_ptr_ = & this->image_(*p_ref_) + *i_;
else
this->value_ptr_ = * value_ref_ + *i_;
}
......@@ -368,7 +369,7 @@ namespace mln
{
mln_invariant(value_ref_ != 0 || p_ref_ != 0);
if (p_ref_)
return image_(*p_ref_);
return this->image_(*p_ref_);
else
return **value_ref_;
}
......@@ -397,7 +398,7 @@ namespace mln
if (is_valid())
{
if (p_ref_)
this->value_ptr_ = & image_(*p_ref_) + *i_;
this->value_ptr_ = & this->image_(*p_ref_) + *i_;
else
this->value_ptr_ = * value_ref_ + *i_;
}
......
// 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.
//
......@@ -44,7 +45,7 @@
namespace mln
{
// Forward declaration.
template <unsigned N, unsigned D, typename P> class p_faces;
template <unsigned N, unsigned D, typename P> struct p_faces;
/// \brief Point site associated to a mln::p_faces.
......
// 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.
//
......@@ -40,7 +41,7 @@ namespace mln
{
// Forward declaration.
template <typename I, typename Fwd> struct ch_piter_image;
template <typename I, typename Fwd> class ch_piter_image;
namespace internal
......
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Copyright (C) 2008, 2009, 2010, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -364,9 +364,10 @@ namespace mln
template <typename Pref>
inline
void
complex_window_bkd_piter<I, G, W>::center_at_(const Pref& /* c */)
complex_window_bkd_piter<I, G, W>::center_at_(const Pref& c)
{
// FIXME: Argument C is not used here... Is this normal?
(void) c;
iter_.center_at(this->center().face());
}
......
// 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.
//
......@@ -43,7 +44,7 @@ namespace mln
// Forward declaration.
template <typename I> class extended;
template <typename I> struct extended;
namespace internal
......
// 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.
//
......@@ -42,7 +43,7 @@ namespace mln
{
// Forward declaration.
template <typename I, typename F> struct extension_fun;
template <typename I, typename F> class extension_fun;
namespace internal
......
// 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.
//
......@@ -40,7 +40,7 @@ namespace mln
{
// Forward declaration.
template <typename I, typename J> struct extension_ima;
template <typename I, typename J> class extension_ima;
namespace internal
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment