Hello, I've compiled a list of the warnings we were getting in our application (MSVC8 on Win32) that were caused by OSG2. I'm providing a simple patch for three of them, plus some comments.
#1 >OSGBaseTypeTraits.h(995) : warning C4305: 'return' : truncation from 'double' to 'OSG::Real32' Added the suffix "f" to a constant. #2 >OSGFieldConnector.inl(65) : warning C4800: 'OSG::BitVector' : forcing value to bool 'true' or 'false' (performance warning) >OSGFieldConnector.inl(73) : warning C4800: 'OSG::BitVector' : forcing value to bool 'true' or 'false' (performance warning) Added "!= 0" to the bitwise expression. #3 >OSGTransitPtr.h(198) : warning C4521: 'OSG::TransitPtr<ObjectT>' : multiple copy constructors specified >OSGTransitPtr.h(198) : warning C4522: 'OSG::TransitPtr<ObjectT>' : multiple assignment operators specified Was there a reason for this one? Is this auto-generated code? AFAIK the const-ref versions of the copy constructors / assignments are enough; you shouldn't need a non-const-ref version (that I removed). #Unfixed1 >OSGTextFaceFactory.h(183) : warning C4231: nonstandard extension used : 'extern' before template explicit instantiation I noticed OSG_SYSTEM_EXPIMP_TMPL is set to 'extern' (on win32) in OSGSystemDef.h. At least at the line above, it's not necessary. Is 'extern' really necessary somewhere? IIRC it's only needed if you're building a static lib, template stuff is always inlined so the extern is not needed. #Unfixed2 >OSGGeoIntegralProperty.h(78) : warning C4244: 'return' : conversion from 'OSG::GeoIntegralProperty::MaxTypeT' to 'OSG::UInt32', possible loss of data >OSGGeoIntegralProperty.inl(52) : see reference to function template instantiation 'ExternalType OSG::GeoIntegralProperty::getValue<OSG::UInt32>(const OSG::UInt32) const' being compiled Yes, this is a stupid warning, but removing the const from the function parameter would do no harm. Again I didn't fix this, it's up to you. Thanks, Thiago
warnings.patch
Description: Binary data
------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________ Opensg-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-core
