# Massive warnings from Boost.Python

This topic is 4080 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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?

##### Share on other sites
Quote:
 Original post by EzbezI'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)

##### Share on other sites
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.

##### Share on other sites
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.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631428
• Total Posts
3000027
×