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

Björn Blissing bjorn.blissing at vti.se
Mon Jun 6 05:55:09 PDT 2016


robertosfield wrote:
> The HORROR!!! :-) 


What? Don't you approve of using the variable name 'c' throughout the entire codebase and in pretty much every scope?   :-)

With these warnings out of the way I only get these warnings:


In the LUA-plugin:


Code:

d:\code\github\openscenegraph\src\osgplugins\lua\lua-5.2.3\src\lapi.c(1110): warning C4702: unreachable code




Which is also denoted by a corresponding comment in the code:
"/* code unreachable; will unlock when control actually leaves the kernel */"

So this warning should probably be disabled.


In the OSC-plugin:


Code:
openscenegraph\src\osgPlugins\osc\ip\win32\NetworkingUtils.cpp(80): warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings
  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(2238): note: see declaration of 'gethostbyname'
openscenegraph\src\osgPlugins\osc\ip\win32\UdpSocket.cpp(401): warning C4456: declaration of 'currentTimeMs' hides previous local declaration
  openscenegraph\src\osgPlugins\osc\ip\win32\UdpSocket.cpp(386): note: see declaration of 'currentTimeMs'




The first one is self explainatory. The second one is a simple variable shadowing. Which I do not think have any unintended consequences.


In the OSG-plugin:


Code:
openscenegraph\src\osgPlugins\osg\ReaderWriterOSG.cpp(257): warning C4459: declaration of 'NodeList' hides global declaration
  openscenegraph\include\osg/Group(22): note: see declaration of 'osg::NodeList'




This class defines the following:
typedef std::vector<osg::Node*> NodeList;

Which is different compared to the definintion in osg/Group, which uses a ref_ptr instead.


And finally in the TXP plugin:

Code:
openscenegraph\src\osgPlugins\txp\trpage_pparse.cpp(241): warning C4458: declaration of 'imageHelp' hides class member
  openscenegraph\src\osgPlugins\txp\trpage_print.h(136): note: see declaration of 'trpgPrintGraphParser::imageHelp'



This last one may actually have consequences which the author did not intend. But I am entirely not sure. The author have a protected member variable named imageHelp, which is set in the constructor. It also have an access method. But the variable is not used anywhere inside of the class, instead the scoped variable with the same name is used. 


Regards
Björn

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








More information about the osg-users mailing list