Boost logo

Boost Users :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-11-05 11:57:14


Jeff Flinn wrote:
> We compile our app with -Wunused-variables on the Mac with gcc 4.0. We
> get several unused variable warnings due to
> <boost/xpressive/regex_primitives.hpp>.
>
> Is there some facility for quieting these from xpressive itself? We
> currently are using #pragma unused ( eol, ...) to quiet the list of
> about 15 unused variables.

Are you using the version of xpressive in 1.34, or in the latest .zip
archive from the Boost file vault? In the latest code, I have tried to
stifle these warnings by adding the following to regex_primitives.hpp:

namespace detail
{
     inline void ignore_unused_regex_primitives()
     {
         ignore_unused(repeat_max);
         ignore_unused(inf);
         ignore_unused(epsilon);
         ...
         ignore_unused(keep);
     }
}

where ignore_unused() is merely:

     template<typename T>
     void ignore_unused(T const &)
     {
     }

That seems to work for me. You might try something similar.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net