Boost C++ Libraries: Ticket #6926: Clang warnings in accumulators/numeric/functional.hpp https://svn.boost.org/trac10/ticket/6926 <p> Hi! I have the following warnings on linux with clang (svn) </p> <p> $ clang --version clang version 3.2 (trunk) Target: x86_64-pc-linux-gnu Thread model: posix </p> <p> In file included from /usr/include/boost-1_48/boost/accumulators/statistics/mean.hpp:14: /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:188:47: warning: unused variable 'plus' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(plus, +, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:189:47: warning: unused variable 'minus' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(minus, -, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:190:47: warning: unused variable 'multiplies' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(multiplies, *, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:191:47: warning: unused variable 'divides' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(divides, /, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:192:47: warning: unused variable 'modulus' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(modulus, %, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:193:47: warning: variable 'greater' is not needed and will not be emitted [-Wunneeded-internal-declaration] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(greater, &gt;, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:194:47: warning: unused variable 'greater_equal' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(greater_equal, &gt;=, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:195:47: warning: variable 'less' is not needed and will not be emitted [-Wunneeded-internal-declaration] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(less, &lt;, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:196:47: warning: unused variable 'less_equal' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(less_equal, &lt;=, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:197:47: warning: unused variable 'equal_to' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(equal_to, ==, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:198:47: warning: unused variable 'not_equal_to' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(not_equal_to, !=, BOOST_NUMERIC_FUNCTIONAL_DEDUCED) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:200:47: warning: unused variable 'assign' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(assign, =, BOOST_NUMERIC_FUNCTIONAL_LEFT) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:201:47: warning: unused variable 'plus_assign' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(plus_assign, +=, BOOST_NUMERIC_FUNCTIONAL_LEFT) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:202:47: warning: unused variable 'minus_assign' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(minus_assign, -=, BOOST_NUMERIC_FUNCTIONAL_LEFT) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:203:47: warning: unused variable 'multiplies_assign' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(multiplies_assign, *=, BOOST_NUMERIC_FUNCTIONAL_LEFT) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:204:47: warning: unused variable 'divides_assign' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(divides_assign, /=, BOOST_NUMERIC_FUNCTIONAL_LEFT) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:205:47: warning: unused variable 'modulus_assign' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(modulus_assign, %=, BOOST_NUMERIC_FUNCTIONAL_LEFT) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:207:46: warning: unused variable 'unary_plus' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(unary_plus, +) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:208:46: warning: unused variable 'unary_minus' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(unary_minus, -) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:209:46: warning: unused variable 'complement' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(complement, ~) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:210:46: warning: unused variable 'logical_not' [-Wunused-variable] </p> <blockquote> <p> BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(logical_not, !) </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP' </p> <blockquote> <p> op::Name const &amp;Name = boost::detail::pod_singleton&lt;op::Name&gt;::instance; \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:412:31: warning: unused variable 'min_assign' [-Wunused-variable] </p> <blockquote> <p> op::min_assign const &amp;min_assign = boost::detail::pod_singleton&lt;op::min_assign&gt;::instance; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:413:31: warning: unused variable 'max_assign' [-Wunused-variable] </p> <blockquote> <p> op::max_assign const &amp;max_assign = boost::detail::pod_singleton&lt;op::max_assign&gt;::instance; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:415:27: warning: unused variable 'as_min' [-Wunused-variable] </p> <blockquote> <p> op::as_min const &amp;as_min = boost::detail::pod_singleton&lt;op::as_min&gt;::instance; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:416:27: warning: unused variable 'as_max' [-Wunused-variable] </p> <blockquote> <p> op::as_max const &amp;as_max = boost::detail::pod_singleton&lt;op::as_max&gt;::instance; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:417:28: warning: unused variable 'as_zero' [-Wunused-variable] </p> <blockquote> <p> op::as_zero const &amp;as_zero = boost::detail::pod_singleton&lt;op::as_zero&gt;::instance; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> /usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:418:27: warning: unused variable 'as_one' [-Wunused-variable] </p> <blockquote> <p> op::as_one const &amp;as_one = boost::detail::pod_singleton&lt;op::as_one&gt;::instance; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In file included from /usr/include/boost-1_48/boost/accumulators/accumulators.hpp:20: /usr/include/boost-1_48/boost/accumulators/framework/parameters/weight.hpp:17:30: warning: unused variable 'weight' [-Wunused-variable] BOOST_PARAMETER_KEYWORD(tag, weight) </p> <blockquote> <p> <sup> </sup></p> </blockquote> <p> /usr/include/boost-1_48/boost/parameter/keyword.hpp:143:64: note: expanded from macro 'BOOST_PARAMETER_KEYWORD' </p> <blockquote> <p> ::boost::parameter::keyword&lt;tag_namespace::name&gt; const&amp; name \ </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> In file included from /usr/include/boost-1_48/boost/accumulators/accumulators.hpp:21: /usr/include/boost-1_48/boost/accumulators/framework/parameters/weights.hpp:17:30: warning: unused variable 'weights' [-Wunused-variable] BOOST_PARAMETER_KEYWORD(tag, weights) </p> <blockquote> <p> <sup> </sup></p> </blockquote> <p> /usr/include/boost-1_48/boost/parameter/keyword.hpp:143:64: note: expanded from macro 'BOOST_PARAMETER_KEYWORD' </p> <blockquote> <p> ::boost::parameter::keyword&lt;tag_namespace::name&gt; const&amp; name \ </p> </blockquote> <p> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6926 Trac 1.4.3 Eric Niebler Tue, 05 Mar 2013 07:08:37 GMT <link>https://svn.boost.org/trac10/ticket/6926#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6926#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83308" title="silence unused variable warnings, refs #6926">[83308]</a>) silence unused variable warnings, refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6926" title="#6926: Bugs: Clang warnings in accumulators/numeric/functional.hpp (closed: fixed)">#6926</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Sun, 10 Mar 2013 01:16:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6926#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6926#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83392" title="another attempt at silencing unused variable warnings, refs #6926">[83392]</a>) another attempt at silencing unused variable warnings, refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6926" title="#6926: Bugs: Clang warnings in accumulators/numeric/functional.hpp (closed: fixed)">#6926</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Fri, 29 Mar 2013 19:44:41 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6926#comment:3 https://svn.boost.org/trac10/ticket/6926#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83633" title="merge [83308] and [83392] from trunk, fixes #6926">[83633]</a>) merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/83308" title="silence unused variable warnings, refs #6926">[83308]</a> and <a class="changeset" href="https://svn.boost.org/trac10/changeset/83392" title="another attempt at silencing unused variable warnings, refs #6926">[83392]</a> from trunk, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6926" title="#6926: Bugs: Clang warnings in accumulators/numeric/functional.hpp (closed: fixed)">#6926</a> </p> Ticket