[osg-users] Preparing to make 3.5.3 dev release, please test

Robert Osfield robert.osfield at gmail.com
Fri Jun 3 03:34:20 PDT 2016


Hi Laurens,

I've merged Bjorn's changes to GraphicsWindowWin32.cpp.  Also rather
than merge your changes to ShapeDrawable I have added to the
include/osg/Math header float variants to osg::PI etc. in the form
osg::PIf.  I then replaced the osg::PI usage in ShapeDrawable.cpp to
osg::PIf which should in theory fix the warnings.

I have checked all these changes in to git master.

Robert.

On 3 June 2016 at 10:06, Voerman, L. <l.voerman at rug.nl> wrote:
> Hi all,
> After updating to visual studio 2015 I fixed a few of those (minor)
> warnings,
> attached are the modified versions I use for
> src\osg\ShapeDrawable.cpp
> src\osgViewer\GraphicsWindowWin32.cpp
>
> Regards, Laurens.
>
> On Fri, Jun 3, 2016 at 10:48 AM, Björn Blissing <bjorn.blissing at vti.se>
> wrote:
>>
>> Hi,
>>
>> I compiled the latest master with Visual Studio 2015.
>>
>> I got a couple of warnings.  First of all I got a ton of these, which all
>> originates from the same origin:
>>
>>
>> Code:
>>
>> ...
>> OpenSceneGraph\include\osg/OperationThread(80): warning C4589: Constructor
>> of abstract class 'osg::Operation' ignores initializer for virtual base
>> class 'osg::Referenced' (compiling source file
>> D:\github\OpenSceneGraph\src\osg\AnimationPath.cpp)
>>   OpenSceneGraph\include\osg/OperationThread(80): note: virtual base
>> classes are only initialized by the most-derived type (compiling source file
>> D:\github\OpenSceneGraph\src\osg\AnimationPath.cpp)
>> ...
>>
>>
>>
>>
>> And the same warnings for the following classes:
>>
>>
>> Code:
>>
>> OpenSceneGraph\src\osgGA\CameraManipulator.cpp(24): warning C4589:
>> Constructor of abstract class 'osgGA::CameraManipulator' ignores initializer
>> for virtual base class 'osg::Callback'
>>   OpenSceneGraph\src\osgGA\CameraManipulator.cpp(24): note: virtual base
>> classes are only initialized by the most-derived type
>> OpenSceneGraph\src\osgGA\StandardManipulator.cpp(51): warning C4589:
>> Constructor of abstract class 'osgGA::StandardManipulator' ignores
>> initializer for virtual base class 'osg::Callback'
>>   OpenSceneGraph\src\osgGA\StandardManipulator.cpp(51): note: virtual base
>> classes are only initialized by the most-derived type
>> OpenSceneGraph\src\osgViewer\ViewerBase.cpp(44): warning C4589:
>> Constructor of abstract class 'osgViewer::ViewerBase' ignores initializer
>> for virtual base class 'osg::Object'
>>   OpenSceneGraph\src\osgViewer\ViewerBase.cpp(44): note: virtual base
>> classes are only initialized by the most-derived type
>> OpenSceneGraph\src\osgViewer\ViewerBase.cpp(50): warning C4589:
>> Constructor of abstract class 'osgViewer::ViewerBase' ignores initializer
>> for virtual base class 'osg::Object'
>>   OpenSceneGraph\src\osgViewer\ViewerBase.cpp(50): note: virtual base
>> classes are only initialized by the most-derived type
>> OpenSceneGraph\src\osgAnimation\AnimationManagerBase.cpp(65): warning
>> C4589: Constructor of abstract class 'osgAnimation::AnimationManagerBase'
>> ignores initializer for virtual base class 'osg::Callback'
>>   OpenSceneGraph\src\osgAnimation\AnimationManagerBase.cpp(65): note:
>> virtual base classes are only initialized by the most-derived type
>>
>>
>>
>>
>> The I get a couple of warnings due to osg::PI being used with floats:
>>
>>
>> Code:
>>
>> OpenSceneGraph\src\osg\ShapeDrawable.cpp(311): warning C4305:
>> 'initializing': truncation from 'double' to 'float'
>> OpenSceneGraph\src\osg\ShapeDrawable.cpp(381): warning C4305:
>> 'initializing': truncation from 'double' to 'float'
>> OpenSceneGraph\src\osg\ShapeDrawable.cpp(669): warning C4305: '=':
>> truncation from 'double' to 'float'
>> OpenSceneGraph\src\osg\ShapeDrawable.cpp(776): warning C4305: '=':
>> truncation from 'double' to 'float'
>> OpenSceneGraph\src\osg\ShapeDrawable.cpp(1479): warning C4305:
>> 'initializing': truncation from 'double' to 'float'
>> OpenSceneGraph\src\osg\ShapeDrawable.cpp(1697): warning C4305: '=':
>> truncation from 'double' to 'float'
>> OpenSceneGraph\src\osg\ShapeDrawable.cpp(1783): warning C4305: '=':
>> truncation from 'double' to 'float'
>>
>>
>>
>>
>>
>> Then some warnings about narrowing conversions:
>>
>>
>> Code:
>> OpenSceneGraph\src\osgViewer\GraphicsWindowWin32.cpp(1693): warning C4838:
>> conversion from 'int' to 'DWORD' requires a narrowing conversion
>> OpenSceneGraph\src\osgViewer\GraphicsWindowWin32.cpp(1693): warning C4838:
>> conversion from 'unsigned int' to 'BYTE' requires a narrowing conversion
>>
>>
>>
>> And finally some shadowed variable warnings:
>>
>>
>> Code:
>> OpenSceneGraph\src\osgShadow\ConvexPolyhedron.cpp(820): warning C4459:
>> declaration of 'Points' hides global declaration
>>   OpenSceneGraph\src\osgShadow\ConvexPolyhedron.cpp(88): note: see
>> declaration of '`anonymous-namespace'::Points'
>> OpenSceneGraph\src\osgViewer\GraphicsWindowWin32.cpp(2739): warning C4457:
>> declaration of 'lParam' hides function parameter
>>   OpenSceneGraph\src\osgViewer\GraphicsWindowWin32.cpp(2511): note: see
>> declaration of 'lParam'
>>
>>
>>
>> There was also a lot of (+100) shadow warnings in the 3ds library. As well
>> as one shadow warning each for the fbx and txp library.
>>
>> Regards
>>
>> Björn
>>
>> ------------------
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=67374#67374
>>
>>
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list