Boost logo

Boost Users :

Subject: [Boost-users] [signals2] Removal of 'unused variable' warnings
From: sguazt (marco.guazzone_at_[hidden])
Date: 2011-02-14 07:55:48


Dear Signals2 developers,

I get an unused variable warning from my compiler (g++ 4.5.1, with
flags "-Wall -Wextra -ansi -pedantic") at lines 510 and 515 of file
"boost/signals2/detail/signal_template.hpp".

The warning is issued for the parameter "is_group" which is not used any more.

Please, could you fix it?

Possible solutions:
a) Add a comment around the parameter name:
        void do_disconnect(const group_type &group, mpl::bool_<true>
/*is_group*/)
        ...
        template<typename T>
        void do_disconnect(const T &slot, mpl::bool_<false> /*is_group*/)

b) Add a void statement:
        void do_disconnect(const group_type &group, mpl::bool_<true> is_group)
        {
          (void)is_group;
        }
        template<typename T>
        void do_disconnect(const T &slot, mpl::bool_<false> is_group)
        {
          (void)is_group;
          ...
        }

Thank you very much in advance!!

Best,

-- Marco


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