Well, since I could not find a way to disable this particular warning, I resorted to using gcC # pragma system_header. Basically, I wrapped the problem header as follows:
#if defined __GNUC__
#pragma gcc system_header
#elif defined __SUNPRO_CC
#pragma disable_warn
#elif defined _MSC_VER
#pragma warning (push, 1)
#endif
#include "foo.h"
#if defined __SUNPRO_CC
#pragma enable_warn
#elif defined _MSC_VER
#pragma warning (pop)
#endif
where foo.h was the problematic header. Now I just turned on this fooWrapper.h and the problem went away. Please note that this should work for some other compilers (MSC and SUNPRO), but I have not tested it.
user125778
source share