1

Possible Duplicate:
How to suppress GCC warnings from library headers?

I just activated the -Weffc++ compiler switch, and now I get literaly tons of warnings related to the boost library.

Here is the first warning:

In file included from /usr/local/boost_1_47_0/boost/type_traits/detail/bool_trait_def.hpp:15:0,
             from /usr/local/boost_1_47_0/boost/type_traits/is_same.hpp:31,
             from /usr/local/boost_1_47_0/boost/type_traits/intrinsics.hpp:128,
             from /usr/local/boost_1_47_0/boost/type_traits/is_convertible.hpp:15,
             from /usr/local/boost_1_47_0/boost/thread/detail/move.hpp:11,
             from /usr/local/boost_1_47_0/boost/thread/locks.hpp:9,
             from /usr/local/boost_1_47_0/boost/thread/pthread/mutex.hpp:12,
             from /usr/local/boost_1_47_0/boost/thread/mutex.hpp:16,
             from /usr/local/boost_1_47_0/boost/thread/pthread/thread_data.hpp:12,
             from /usr/local/boost_1_47_0/boost/thread/thread.hpp:17,
             from /usr/local/boost_1_47_0/boost/thread.hpp:13,
             from src/tcpserver.cpp:4:
/usr/local/boost_1_47_0/boost/type_traits/integral_constant.hpp:25:19: warning: base class ‘struct mpl_::bool_<true>’ has a non-virtual destructor [-Weffc++]

I just wanted to make my own code better, so how can I stop the compiler issuing warnings on non-user generated header files?

Or is there a way to limit the depth of the search? This might help since the boost includes are very nested (see warning above).

Community
  • 1
  • 1
Michael Hilbert
  • 246
  • 1
  • 4
  • 11
  • 2
    See this: http://stackoverflow.com/questions/1867065/how-to-suppress-gcc-warnings-from-library-headers – jrok Jan 02 '12 at 22:30

0 Answers0