Opened 15 years ago
Closed 15 years ago
#1464 closed Bugs (fixed)
boost_range_array unused in several array_size() functions
Reported by: | Owned by: | Thorsten Ottosen | |
---|---|---|---|
Milestone: | To Be Determined | Component: | range |
Version: | Boost 1.34.1 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
The boost_range_array parameter is not used in several overloads of array_size() in range/details/implementation_help.hpp - this generates warnings and halts our builds.
Change History (6)
comment:1 by , 15 years ago
Status: | new → assigned |
---|
comment:2 by , 15 years ago
I don't really no how to silence this warning, so I'd really appreciate a patch.
Thanks
-Thorsten
comment:3 by , 15 years ago
I have now added a test that run for normal compilers. Neither vc8 nor gcc gives me any warnings. What compiler are you getting warnings with?
-Thorsten
comment:4 by , 15 years ago
gcc with -Wunused or -Wall (you can ask Mat Marcus for the bjam file if you would like) - our teams compile with all warnings on and warnings as errors. Here is the patch.
Sean
p4 diff 'boost_libraries/boost/range/detail/implementation_help.hpp#3'
boost_libraries/boost/range/detail/implementation_help.hpp#3 - /Users/sparent/development/projects/boost_libraries/boost/range/detail/implementation_help.hpp
112a113,120
/*
ADOBE (sparent@…) 1464 : Using unused parameter to silence warnings.
*/ template <typename T> inline void adobe_boost_range_size_unused(const T&) { } /*
END ADOBE
*/
116a125,131
/*
ADOBE (sparent@…) 1464 : Using unused parameter to silence warnings.
*/
adobe_boost_range_size_unused(boost_range_array);
/*
END ADOBE
*/
122a138,144
/*
ADOBE (sparent@…) 1464 : Using unused parameter to silence warnings.
*/
adobe_boost_range_size_unused(boost_range_array);
/*
END ADOBE
*/
128a151,157
/*
ADOBE (sparent@…) 1464 : Using unused parameter to silence warnings.
*/
adobe_boost_range_size_unused(boost_range_array);
/*
END ADOBE
*/
134a164,170
/*
ADOBE (sparent@…) 1464 : Using unused parameter to silence warnings.
*/
adobe_boost_range_size_unused(boost_range_array);
/*
END ADOBE
*/
comment:5 by , 15 years ago
Sorry - wiki ate that...
p4 diff '//boost_libraries/boost/range/detail/implementation_help.hpp#3' ==== //boost_libraries/boost/range/detail/implementation_help.hpp#3 - /Users/sparent/development/projects/boost_libraries/boost/range/detail/implementation_help.hpp ==== 112a113,120 > /* > ADOBE (sparent@adobe.com) 1464 : Using unused parameter to silence warnings. > */ > template <typename T> > inline void adobe_boost_range_size_unused(const T&) { } > /* > END ADOBE > */ 116a125,131 > /* > ADOBE (sparent@adobe.com) 1464 : Using unused parameter to silence warnings. > */ > adobe_boost_range_size_unused(boost_range_array); > /* > END ADOBE > */ 122a138,144 > /* > ADOBE (sparent@adobe.com) 1464 : Using unused parameter to silence warnings. > */ > adobe_boost_range_size_unused(boost_range_array); > /* > END ADOBE > */ 128a151,157 > /* > ADOBE (sparent@adobe.com) 1464 : Using unused parameter to silence warnings. > */ > adobe_boost_range_size_unused(boost_range_array); > /* > END ADOBE > */ 134a164,170 > /* > ADOBE (sparent@adobe.com) 1464 : Using unused parameter to silence warnings. > */ > adobe_boost_range_size_unused(boost_range_array); > /* > END ADOBE > */
Please submit a patch
Thanks
-Thorsten