[Boost-bugs] [Boost C++ Libraries] #2455: g++ -Wall compile error: boost/format/parsing.hpp:47: warning: unused parameter 'fac'

Subject: [Boost-bugs] [Boost C++ Libraries] #2455: g++ -Wall compile error: boost/format/parsing.hpp:47: warning: unused parameter 'fac'
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-10-31 17:17:26


#2455: g++ -Wall compile error: boost/format/parsing.hpp:47: warning: unused
parameter 'fac'
---------------------------------------------------+------------------------
 Reporter: ANDREW CHITTENDEN <andyc_at_[hidden]> | Owner: samuel_krempp
     Type: Bugs | Status: new
Milestone: Boost 1.37.0 | Component: format
  Version: Boost 1.36.0 | Severity: Problem
 Keywords: |
---------------------------------------------------+------------------------
 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

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2455>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC