[osg-users] [build] x86_64, cmd line, built OK - but warning in Xcode

Hartwig Wiesmann hartwig.wiesmann at skywind.eu
Thu Jan 5 10:09:59 PST 2017


Hi Robert,

I fully agree with you!
But would you mind if I submit patches that at least remove some warnings of existing code by adding an appropriate cast (the code with and without the cast should be identical)? I am especially concerned about header files because then the warnings are also polluting my code (and there might be some bugs).

Example (taken from osg::Drawable):


Code:
        virtual void apply(const ByteArray& array) {  if (!array.empty()) _af.apply(_type,array.size(),&(array.front())); }




should be replaced by


Code:
        virtual void apply(const ByteArray& array) {  if (!array.empty()) _af.apply(_type,static_cast<unsigned int>(array.size()),&(array.front())); }




Doing this kind of modification in osg::Drawable alone will remove about 30 to 40 warnings already!

Thank you!

Cheers,
Hartwig

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69889#69889








More information about the osg-users mailing list