From 28df5bc4821bd5d17ffc9e77c0f2b3c271e509b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Mon, 29 Oct 2018 15:26:53 +0100 Subject: [PATCH] Clean up several warnings about unreferenced formal parameters Add comment to premultiply.hpp: - FIXME: Is c input paramater not used intentionally? --- include/boost/gil/premultiply.hpp | 9 +++++++-- test/image.cpp | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/boost/gil/premultiply.hpp b/include/boost/gil/premultiply.hpp index ed01dda57..e7fb315c6 100644 --- a/include/boost/gil/premultiply.hpp +++ b/include/boost/gil/premultiply.hpp @@ -10,6 +10,7 @@ #include +#include #include #include @@ -25,6 +26,8 @@ struct channel_premultiply template void operator()(Channel c) const { + // FIXME: Is c input paramater not used intentionally? Add comment on relation between src_ vs c. + // @todo: need to do a “channel_convert” too, in case the channel types aren't the same? get_color(dst_, Channel()) = channel_multiply(get_color(src_,Channel()), alpha_or_max(src_)); } @@ -41,9 +44,11 @@ namespace detail } template - void assign_alpha_if(mpl::false_, SrcP const &src, DstP &dst) + void assign_alpha_if(mpl::false_, SrcP const& src, DstP& dst) { - // nothing to do + // nothing to do + boost::ignore_unused(src); + boost::ignore_unused(dst); } } diff --git a/test/image.cpp b/test/image.cpp index e7b9b513f..a2457de98 100644 --- a/test/image.cpp +++ b/test/image.cpp @@ -12,6 +12,7 @@ #include +#include #include #include #include @@ -170,7 +171,11 @@ private: template void basic_test(const string& prefix); template void view_transformations_test(const View& img_view, const string& prefix); template void homogeneous_view_transformations_test(const View& img_view, const string& prefix, mpl::true_); - template void homogeneous_view_transformations_test(const View& img_view, const string& prefix, mpl::false_) {} + template void homogeneous_view_transformations_test(const View& img_view, const string& prefix, mpl::false_) + { + boost::ignore_unused(img_view); + boost::ignore_unused(prefix); + } template void histogram_test(const View& img_view, const string& prefix); void virtual_view_test(); void packed_image_test();