Opened 14 years ago
Closed 14 years ago
#2455 closed Bugs (fixed)
g++ -Wall compile error: boost/format/parsing.hpp:47: warning: unused parameter 'fac'
Reported by: | Owned by: | Marshall Clow | |
---|---|---|---|
Milestone: | Boost 1.37.0 | Component: | format |
Version: | Boost 1.36.0 | Severity: | Problem |
Keywords: | Cc: |
Description
If BOOST_NO_LOCALE_ISDIGIT is defined, then if building with -W -Wall, you get a compile error:
/home/andyc/work/tiger/1/include/ppc_BOS/boost/format/parsing.hpp: In instantiation of 'bool boost::io::detail::wrap_isdigit(const Facet&, Ch) [with Ch = char, Facet = boost::io::basic_oaltstringstream<char, std::char_traits<char>, std::allocator<char> >]': /home/andyc/work/tiger/1/include/ppc_BOS/boost/format/parsing.hpp:153: instantiated from 'bool boost::io::detail::parse_printf_directive(Iter&, const Iter&, boost::io::detail::format_item<Ch, Tr, Alloc>*, const Facet&, size_t, unsigned char) [with Ch = char, Tr = std::char_traits<char>, Alloc = std::allocator<char>, Iter = const char*, Facet = boost::io::basic_oaltstringstream<char, std::char_traits<char>, std::allocator<char> >]' /home/andyc/work/tiger/1/include/ppc_BOS/boost/format/parsing.hpp:449: instantiated from 'boost::basic_format<Ch, Tr, Alloc>& boost::basic_format<Ch, Tr, Alloc>::parse(const std::basic_string<_CharT, _Traits, _Alloc>&) [with Ch = char, Tr = std::char_traits<char>, Alloc = std::allocator<char>]' /home/andyc/work/tiger/1/include/ppc_BOS/boost/format/format_implementation.hpp:33: instantiated from 'boost::basic_format<Ch, Tr, Alloc>::basic_format(const Ch*) [with Ch = char, Tr = std::char_traits<char>, Alloc = std::allocator<char>]' /home/andyc/work/tiger/1/libs/cli/user/fc.cpp:76: instantiated from here /home/andyc/work/tiger/1/include/ppc_BOS/boost/format/parsing.hpp:47: warning: unused parameter 'fac'
The following patch fixes it:
boost/format/parsing.hpp 1.1 vs +
--- 1.1/boost/format/parsing.hpp 2007-08-17 11:57:50 +01:00 +++ +/boost/format/parsing.hpp 2007-08-17 13:28:25 +01:00 @@ -47,6 +47,7 @@
#if ! defined( BOOST_NO_LOCALE_ISDIGIT )
return fac.is(std::ctype<Ch>::digit, c);
# else
+ (void) fac;
using namespace std; return isdigit(c);
#endif
Change History (2)
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Merged to release in revision 52525.
Fixed in trunk (revision #52258) I will merge to release after a few test cycles.