Opened 10 years ago

Closed 10 years ago

#6926 closed Bugs (fixed)

Clang warnings in accumulators/numeric/functional.hpp

Reported by: ph03@… Owned by: Eric Niebler
Milestone: To Be Determined Component: accumulator
Version: Boost 1.49.0 Severity: Cosmetic
Keywords: Cc:

Description

Hi! I have the following warnings on linux with clang (svn)

$ clang --version clang version 3.2 (trunk) Target: x86_64-pc-linux-gnu Thread model: posix

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]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(plus, +, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:189:47: warning: unused variable 'minus' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(minus, -, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:190:47: warning: unused variable 'multiplies' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(multiplies, *, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:191:47: warning: unused variable 'divides' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(divides, /, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:192:47: warning: unused variable 'modulus' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(modulus, %, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/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]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(greater, >, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:194:47: warning: unused variable 'greater_equal' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(greater_equal, >=, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/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]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(less, <, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:196:47: warning: unused variable 'less_equal' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(less_equal, <=, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:197:47: warning: unused variable 'equal_to' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(equal_to, ==, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:198:47: warning: unused variable 'not_equal_to' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(not_equal_to, !=, BOOST_NUMERIC_FUNCTIONAL_DEDUCED)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:200:47: warning: unused variable 'assign' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(assign, =, BOOST_NUMERIC_FUNCTIONAL_LEFT)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:201:47: warning: unused variable 'plus_assign' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(plus_assign, +=, BOOST_NUMERIC_FUNCTIONAL_LEFT)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:202:47: warning: unused variable 'minus_assign' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(minus_assign, -=, BOOST_NUMERIC_FUNCTIONAL_LEFT)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:203:47: warning: unused variable 'multiplies_assign' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(multiplies_assign, *=, BOOST_NUMERIC_FUNCTIONAL_LEFT)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:204:47: warning: unused variable 'divides_assign' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(divides_assign, /=, BOOST_NUMERIC_FUNCTIONAL_LEFT)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:205:47: warning: unused variable 'modulus_assign' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP(modulus_assign, %=, BOOST_NUMERIC_FUNCTIONAL_LEFT)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:167:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_BINARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:207:46: warning: unused variable 'unary_plus' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(unary_plus, +)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:208:46: warning: unused variable 'unary_minus' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(unary_minus, -)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:209:46: warning: unused variable 'complement' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(complement, ~)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:210:46: warning: unused variable 'logical_not' [-Wunused-variable]

BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP(logical_not, !)

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:124:25: note: expanded from macro 'BOOST_NUMERIC_FUNCTIONAL_DEFINE_UNARY_OP'

op::Name const &Name = boost::detail::pod_singleton<op::Name>::instance; \

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:412:31: warning: unused variable 'min_assign' [-Wunused-variable]

op::min_assign const &min_assign = boost::detail::pod_singleton<op::min_assign>::instance;

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:413:31: warning: unused variable 'max_assign' [-Wunused-variable]

op::max_assign const &max_assign = boost::detail::pod_singleton<op::max_assign>::instance;

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:415:27: warning: unused variable 'as_min' [-Wunused-variable]

op::as_min const &as_min = boost::detail::pod_singleton<op::as_min>::instance;

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:416:27: warning: unused variable 'as_max' [-Wunused-variable]

op::as_max const &as_max = boost::detail::pod_singleton<op::as_max>::instance;

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:417:28: warning: unused variable 'as_zero' [-Wunused-variable]

op::as_zero const &as_zero = boost::detail::pod_singleton<op::as_zero>::instance;

/usr/include/boost-1_48/boost/accumulators/numeric/functional.hpp:418:27: warning: unused variable 'as_one' [-Wunused-variable]

op::as_one const &as_one = boost::detail::pod_singleton<op::as_one>::instance;

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)

/usr/include/boost-1_48/boost/parameter/keyword.hpp:143:64: note: expanded from macro 'BOOST_PARAMETER_KEYWORD'

::boost::parameter::keyword<tag_namespace::name> const& name \

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)

/usr/include/boost-1_48/boost/parameter/keyword.hpp:143:64: note: expanded from macro 'BOOST_PARAMETER_KEYWORD'

::boost::parameter::keyword<tag_namespace::name> const& name \

Change History (3)

comment:1 by Eric Niebler, 10 years ago

(In [83308]) silence unused variable warnings, refs #6926

comment:2 by Eric Niebler, 10 years ago

(In [83392]) another attempt at silencing unused variable warnings, refs #6926

comment:3 by Eric Niebler, 10 years ago

Resolution: fixed
Status: newclosed

(In [83633]) merge [83308] and [83392] from trunk, fixes #6926

Note: See TracTickets for help on using tickets.