Massive warnings from Boost.Python

Started by
2 comments, last by Julian90 16 years, 12 months ago
I'm using Boost.Python for scripting in my game. I'm compiling in VC++ 2005 EE using Warning level 4. I get many *very* long warnings when compiling my modules. Here's one of them:
2>c:\boost\include\boost-1_33_1\boost\python\object\value_holder.hpp(89) : warning C4100: 'null_ptr_only' : unreferenced formal parameter
2>        c:\boost\include\boost-1_33_1\boost\python\object\value_holder.hpp(90) : while compiling class template member function 'void *boost::python::objects::value_holder<Value>::holds(boost::python::type_info,bool)'
2>        with
2>        [
2>            Value=EntityHandle
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\type_traits\alignment_of.hpp(37) : see reference to class template instantiation 'boost::python::objects::value_holder<Value>' being compiled
2>        with
2>        [
2>            Value=EntityHandle
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\type_traits\alignment_of.hpp(52) : see reference to class template instantiation 'boost::detail::alignment_of_hack<T>' being compiled
2>        with
2>        [
2>            T=holder
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\type_traits\alignment_of.hpp(61) : see reference to class template instantiation 'boost::detail::alignment_of_impl<T>' being compiled
2>        with
2>        [
2>            T=holder
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\python\object\instance.hpp(29) : see reference to class template instantiation 'boost::alignment_of<T>' being compiled
2>        with
2>        [
2>            T=holder
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\python\object\instance.hpp(44) : see reference to class template instantiation 'boost::python::objects::instance<Data>' being compiled
2>        with
2>        [
2>            Data=holder
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\python\class.hpp(499) : see reference to class template instantiation 'boost::python::objects::additional_instance_size<Data>' being compiled
2>        with
2>        [
2>            Data=holder
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\python\class.hpp(629) : see reference to function template instantiation 'void boost::python::class_<W>::initialize<boost::python::init<>>(const DefVisitor &)' being compiled
2>        with
2>        [
2>            W=EntityHandle,
2>            DefVisitor=boost::python::init<>
2>        ]
2>        c:\boost\include\boost-1_33_1\boost\python\class.hpp(627) : while compiling class template member function 'boost::python::class_<W>::class_(const char *,const char *)'
2>        with
2>        [
2>            W=EntityHandle
2>        ]
2>        c:\documents and settings\owner\desktop\tom's useless junk\opengl games\gravitas\pythonentitymodule.h(8) : see reference to class template instantiation 'boost::python::class_<W>' being compiled
2>        with
2>        [
2>            W=EntityHandle
2>        ]

I don't know templates very well, so these warnings are very cryptic to me. All I understand is that some function in Boost isn't using one of it's parameters. Well, as far as I know, that doesn't affect me and there's nothing I can do about it. If there's nothing I can do, I'd really like to get rid of these warnings. I get a dozen of them, and they are all so long that I can't actually take a look at the *real* warnings and errors. I tried using #pragma warning(push, 0) and #pragma warning(pop) around the file that has all the module definitions, but that didn't change a thing. Do these warnings actually mean anything to mean? If not, how can I get rid of them?
Advertisement
Quote:Original post by Ezbez
I'm using Boost.Python for scripting in my game. I'm compiling in VC++ 2005 EE using Warning level 4. I get many *very* long warnings when compiling my modules. Here's one of them:

*** Source Snippet Removed ***

I don't know templates very well, so these warnings are very cryptic to me. All I understand is that some function in Boost isn't using one of it's parameters. Well, as far as I know, that doesn't affect me and there's nothing I can do about it.

If there's nothing I can do, I'd really like to get rid of these warnings. I get a dozen of them, and they are all so long that I can't actually take a look at the *real* warnings and errors. I tried using #pragma warning(push, 0) and #pragma warning(pop) around the file that has all the module definitions, but that didn't change a thing.

Do these warnings actually mean anything to mean? If not, how can I get rid of them?


did you try #pragma warning (disable: C4100) (or it might be without the C)

You didn't come into this world. You came out of it, like a wave from the ocean. You are not a stranger here. -Alan Watts

I have no idea why I didn't think of that! I even used that exact disable in another part of my code. Thanks! (And it's without the C)

But I still would like someone to confirm that this warning truly can be ignored. I don't really understand it, but it seems innocent enough to me.
Yes you can safely ignore almost all warnings from boost, the particular one you posted is just because somewhere theres something along the lines of
void do_stuff(int param) { }
which causes a warning because param isnt used.

This topic is closed to new replies.

Advertisement