Hi Judson, Over the years we've found VS products lots of unhelpful warnings are perfectly correct code so we've had to resort to disabling them. Adding lots special VS only pragmas to OSG code would be VERY painful to maintain so we don't do it. If you want to do it in your own code then fine, but we won't be doing it with the OSG, it's portable library that tries it best to be clean from platform specific workarounds.
If you don't want the warnings disabled then just select the Cmake option that doesn't defined OSG_DISABLE_MSVC_WARNINGS. Easy. This is why the Cmake option exists. Robert. On 8 January 2014 17:04, Judson Weissert <[email protected]> wrote: > Hi, > > I recently noticed that some of the source files in my project were > compiling, but were not generating some expected warnings. I believe I have > tracked the problem back to a number of OSG headers that are disabling > warnings, but never set them back to their original setting. > > The headers of interest are as follows: > 1) include/osg/Export > 2) include/osgDB/Export > 3) include/osgGA/Export > 4) include/osgText/Export > 5) include/osgUtil/Export > 6) include/osgViewer/Export > > Note: This issue is MSVC specific, and only when OSG_DISABLE_MSVC_WARNINGS > is defined (it appears to be > defined by default). > > Example code from include/osgGA/Export: > > #if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS) > #pragma warning( disable : 4244 ) > #pragma warning( disable : 4251 ) > #pragma warning( disable : 4267 ) > #pragma warning( disable : 4275 ) > #pragma warning( disable : 4290 ) > #pragma warning( disable : 4786 ) > #pragma warning( disable : 4305 ) > #pragma warning( disable : 4996 ) > #endif > > Therefore, any header that includes an Export header will result in > warnings being disabled, and any user code that includes an Export header, > or any header that includes an Export header will have to wrap them in > #pragma warning(push/pop) or deal with warnings being disabled silently > behind the scenes. > > Regards, > > Judson > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

