I suspect the build error is down to the osgViewer:: in the
REGISTER_WINDOWINGSYSTEMINTERFACE line that is affecting the macro
expansion. I have just checked in removal of the osgViewer:: so the
line now looks like:
REGISTER_WINDOWINGSYSTEMINTERFACE(IOS, ConcreteIOSWindowingSystemInterface)
This is now checked into git master. Could you try this out?
Robert.
I haven't finished building yet, but right off the bat I get about a million of these warnings:
Code:
/home/scrawl/Dev/osg/include/osg/Vec3us:34:58: warning: declaration of ‘g’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Vec4f:46:9: warning: declaration of ‘y’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Vec3i:53:9: warning: declaration of ‘g’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Vec3i:53:9: warning: declaration of ‘r’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Vec4f:46:9: warning: declaration of ‘x’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Vec4f: In constructor ‘osg::Vec4f::Vec4f(const osg::Vec3f&, osg::Vec4f::value_type)’:
/home/scrawl/Dev/osg/include/osg/Vec4f:54:9: warning: declaration of ‘w’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Viewport:34:79: warning: declaration of ‘width’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Viewport:34:79: warning: declaration of ‘y’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Viewport:34:79: warning: declaration of ‘x’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Viewport: In member function ‘void osg::Viewport::setViewport(osg::Viewport::value_type, osg::Viewport::value_type, osg::Viewport::value_type, osg::Viewport::value_type)’:
/home/scrawl/Dev/osg/include/osg/Viewport:80:9: warning: declaration of ‘height’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Image: In member function ‘void osg::Image::scaleImage(int, int, int)’:
/home/scrawl/Dev/osg/include/osg/Image:218:44: warning: declaration of ‘r’ shadows a member of 'this' [-Wshadow]
void scaleImage(int s,int t,int r) { scaleImage(s,t,r, getDataType()); }
^
/home/scrawl/Dev/osg/include/osg/Image:218:44: warning: declaration of ‘t’ shadows a member of 'this' [-Wshadow]
/home/scrawl/Dev/osg/include/osg/Image:218:44: warning: declaration of ‘s’ shadows a member of 'this' [-Wshadow]
I'm using g++ 4.8.4.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67357#67357
I've noticed this same issue with a Kubuntu 14.04 install I have, I
don't recall the gcc version but it's below 5 like yours. It seems
the addition of -Wshadow to the OSG_AGGRESSIVE_WARNING_FLAGS causes
mahem with the compile kick out lots of ridiculous shadows reports,
all these warnings related to completely benign instances of a
parameter in one method being named the same as a method in the same
class.
Modern versions of gcc don't have this problem and only generate valid
examples of shadowing of variables that one need to be concerned
about. All these instances have now been fixed so OSG master with a
modern version of gcc using -Wshadow doesn't generate any warnings.
I had a look to see if CMake has a variable so we can only enable
-Wshadow for gcc versions >= 5 but didn't come across one. If it does
then we could optional enable this warning where the compiler actually
does something sensible with it.
Because of this issue I checked in a change to the root CmakeLists.txt
file to allow you to edit the OSG_AGGRESSIVE_WARNING_FLAGS to comment
out or add flags, alternatively you can disable aggressive warnings
entirely by setting OSG_AGGRESSIVE_WARNINGS to OFF.
If it may be that we have to make the use of -Wshadow optional or just
remove it completely.
The other option is just use a modern version of gcc :-)
Robert.
There are tons of warnings such as:
In file included from
/Users/fberard/Downloads/osg_git/OpenSceneGraph-master/include/osg/NodeVisitor:21:
/Users/fberard/Downloads/osg_git/OpenSceneGraph-master/include/osg/ValueMap:53:51:
warning: expression with side effects will be evaluated despite being
used as an operand to 'typeid'
[-Wpotentially-evaluated-expression]
if (itr!=_keyValueMap.end() &&
typeid(*(itr->second))==typeid(UserValueObject))
^
(I guess this is due to NodeVisitor being used everywhere).
And also a bit of:
[ 85%] Building CXX object
applications/osgviewer/CMakeFiles/application_osgviewer.dir/osgviewer.cpp.o
ConfigLexer.cpp:827:2: warning: 'register' storage class specifier is
deprecated [-Wdeprecated-register]
register yy_state_type yy_current_state;
^~~~~~~~~
Also, I did a build in a temporary location (CMAKE_INSTALL_PREFIX to
some place), but the build did not put the path or some relative paths
in the binaries:
[Downloads/osg_git] % otool -L ./bin/osgviewer
./bin/osgviewer:
libosgViewer.144.dylib (compatibility version 144.0.0, current version
3.5.3)
libosgText.144.dylib (compatibility version 144.0.0, current version 3.5.3)
libosgGA.144.dylib (compatibility version 144.0.0, current version 3.5.3)
libosgDB.144.dylib (compatibility version 144.0.0, current version 3.5.3)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 157.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.8)
libosgUtil.144.dylib (compatibility version 144.0.0, current version 3.5.3)
libosg.144.dylib (compatibility version 144.0.0, current version 3.5.3)
libOpenThreads.20.dylib (compatibility version 20.0.0, current version
3.3.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 1226.10.1)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
(compatibility version 1.0.0, current version 22.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
120.1.0)
So, "./osgviewer" did not work out of the box, I had to set
DYLD_LIBRARY_PATH to point to the libraries.
ccmake did warn about something that is probably related:
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run
"cmake
--help-policy CMP0042" for policy details. Use the cmake_policy
command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
OpenThreads
osg
osgAnimation
osgDB
osgFX
osgGA
osgManipulator
osgParticle
osgPresentation
osgShadow
osgSim
osgTerrain
osgText
osgUI
osgUtil
osgViewer
osgVolume
osgWidget
This warning is for project developers. Use -Wno-dev to suppress it.
On 3 June 2016 at 06:01, François Bérard <francoi...@imag.fr> wrote:
> There are tons of warnings such as:
>
> In file included from
> /Users/fberard/Downloads/osg_git/OpenSceneGraph-master/include/osg/NodeVisitor:21:
> /Users/fberard/Downloads/osg_git/OpenSceneGraph-master/include/osg/ValueMap:53:51:
> warning: expression with side effects will be evaluated despite being used
> as an operand to 'typeid'
> [-Wpotentially-evaluated-expression]
> if (itr!=_keyValueMap.end() &&
> typeid(*(itr->second))==typeid(UserValueObject))
> ^
> (I guess this is due to NodeVisitor being used everywhere).
I am clueless to what this warning actually means or how to resolve
it. The code looks fine to me.
>
> And also a bit of:
>
> [ 85%] Building CXX object
> applications/osgviewer/CMakeFiles/application_osgviewer.dir/osgviewer.cpp.o
> ConfigLexer.cpp:827:2: warning: 'register' storage class specifier is
> deprecated [-Wdeprecated-register]
> register yy_state_type yy_current_state;
> ^~~~~~~~~
This is from old Producer Lex and yacc code, I wonder if regenerating
it would fix it.
I don't have an OSX system or OSX expertise so have to defer to
members of the OSG/OSX community to judge what is appropriate and what
is an actual issue and if so how to resolve it.
A general note putting libraries on a library path when the libs are
in a custom place seems normal to me. This is what will happen on all
other platforms so would expect this to be the same under OSX as well.
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
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.
I have installed Clang 3.8 on my Linux dev machine and got it to
reproduce the same typeid error. As far as I can tell this warning is
pretty bogus, effectively enforcing a personal preference of the
compiler developers rather than highlighting anything that is
ambiguous or unsupported. Lots of other projects seem to be affected
by the same error, what the OSG is doing with typeid is pretty
standard. The workaround seems to be to just create a local variable
which does the dereferences and then passes this on to the typeid,
I've applied this and it fixes the Clang error. Having to write extra
code to quieten a stupid warning is pretty bad programming practice as
it can risks introducing bugs so I'm not happy doing this type of
stuff.
Despite using Clang 3.8 I don't see the second set of warnings:
[ 85%] Building CXX object
applications/osgviewer/CMakeFiles/application_osgviewer.dir/osgviewer.cpp.o
ConfigLexer.cpp:827:2: warning: 'register' storage class specifier is
deprecated [-Wdeprecated-register]
register yy_state_type yy_current_state;
I can seen anywhere where the OSG Cmake build system is adding
-Wdeprecated-register. Are you adding this manually?
Robert.
On 3 June 2016 at 06:01, François Bérard <francoi...@imag.fr> wrote:
Since you introduced the osg::PI_2f value, maybe you should replace the two osg::PIf*0.5f found in ShapeDrawable at line 1405 and 1479.
Regards
Björn
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67380#67380
On 3 June 2016 at 09:48, Björn Blissing <bjorn.b...@vti.se> wrote:
>
> 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
Unfortunately I don't see these warnings with the compiler I have
available with the settings that are currently available. Do you know
of what to enable these warnings in gcc or Clang?
The nature of these warnings are such that I really need to be able to
see the warning first hand and attempt a local fix to see the affect.
Cheers,
Robert.
Hi Robert,
I have made a small example which shows the problem with these types of constructors:
https://gist.github.com/bjornblissing/1895b168b2e90762ebee065adb3d3c65
It emits compilation warnings in Visual Studio 2015, but I have been unable to reproduce the warning in neither GCC nor Clang. Although the output of the executable are identical.
Regards
Björn
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67391#67391
On 03/06/16 12:43, Robert Osfield wrote:
> Hi François,
>
> I have installed Clang 3.8 on my Linux dev machine and got it to
> reproduce the same typeid error. As far as I can tell this warning is
> pretty bogus, effectively enforcing a personal preference of the
> compiler developers rather than highlighting anything that is
> ambiguous or unsupported. Lots of other projects seem to be affected
> by the same error, what the OSG is doing with typeid is pretty
> standard. The workaround seems to be to just create a local variable
> which does the dereferences and then passes this on to the typeid,
> I've applied this and it fixes the Clang error. Having to write extra
> code to quieten a stupid warning is pretty bad programming practice as
> it can risks introducing bugs so I'm not happy doing this type of
> stuff.
I agree. But it did silence the warnings on my setup too.
> Despite using Clang 3.8 I don't see the second set of warnings:
>
> [ 85%] Building CXX object
> applications/osgviewer/CMakeFiles/application_osgviewer.dir/osgviewer.cpp.o
> ConfigLexer.cpp:827:2: warning: 'register' storage class specifier is
> deprecated [-Wdeprecated-register]
> register yy_state_type yy_current_state;
>
> I can seen anywhere where the OSG Cmake build system is adding
> -Wdeprecated-register. Are you adding this manually?
nope. unzip, cmake, make. This must be a new default on my Clang (Apple
LLVM version 7.3.0 (clang-703.0.29))
I silenced the warnings by adding:
add_compile_options(-Wno-deprecated-register)
...at line 9 of the main CMakeLists.txt file, i.e. within the first
IF(APPLE) block.
Doing so, the only warnings that remain are calls to deprecated OSX
functions on 2 modules:
[ 62%] Building CXX object
src/osgViewer/CMakeFiles/osgViewer.dir/PixelBufferCocoa.mm.o
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/GraphicsWindowCocoa.mm:1715:14:
warning: 'GetCurrentProcess' is deprecated: first deprecated in OS X
10.9 [-Wdeprecated-declarations]
if (!GetCurrentProcess(&psn)) {
^
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:415:1:
note: 'GetCurrentProcess' has been explicitly marked deprecated here
MacGetCurrentProcess(ProcessSerialNumber * PSN)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9;
^
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:412:34:
note: expanded from macro 'MacGetCurrentProcess'
#define MacGetCurrentProcess GetCurrentProcess
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/GraphicsWindowCocoa.mm:1717:13:
warning: 'SetFrontProcess' is deprecated: first deprecated in OS X 10.9
[-Wdeprecated-declarations]
SetFrontProcess(&psn);
^
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:603:1:
note: 'SetFrontProcess' has been explicitly marked deprecated here
SetFrontProcess(const ProcessSerialNumber * PSN)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9;
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/GraphicsWindowCocoa.mm:1726:29:
warning: incompatible pointer types sending 'CocoaAppDelegate *' to
parameter of type 'id<NSFileManagerDelegate> _Nullable'
[-Wincompatible-pointer-types]
[NSApp setDelegate: [[CocoaAppDelegate alloc] init] ];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/objc/NSObject.h:60:1: note: instance method 'init' is
assumed to return an instance of its receiver type ('CocoaAppDelegate *')
- (instancetype)init
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/DarwinUtils.mm:111:26:
warning: 'CGDisplayModeCopyPixelEncoding' is deprecated: first
deprecated in OS X 10.11 [-Wdeprecated-declarations]
CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(mode);
^
/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:174:34:
note: 'CGDisplayModeCopyPixelEncoding' has been explicitly marked
deprecated here
CG_EXTERN CFStringRef __nullable CGDisplayModeCopyPixelEncoding(
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/DarwinUtils.mm:421:5:
warning: 'SetFrontProcess' is deprecated: first deprecated in OS X 10.9
[-Wdeprecated-declarations]
SetFrontProcess(&sn);
^
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:603:1:
note: 'SetFrontProcess' has been explicitly marked deprecated here
SetFrontProcess(const ProcessSerialNumber * PSN)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9;
^
[ 62%] Building CXX object
src/osgWrappers/deprecated-dotosg/osgParticle/CMakeFiles/osgdb_deprecated_osgparticle.dir/IO_DomainOperator.cpp.o
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/PixelBufferCocoa.mm:59:17:
warning: 'NSOpenGLPFAPixelBuffer' is deprecated: first deprecated in OS
X 10.7 [-Wdeprecated-declarations]
attr[i++] = NSOpenGLPFAPixelBuffer; // for pbuffer usage
^
/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:88:2:
note: 'NSOpenGLPFAPixelBuffer' has been explicitly marked deprecated here
NSOpenGLPFAPixelBuffer NS_ENUM_DEPRECATED_MAC(10_3, 10_7)
= 90,
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/PixelBufferCocoa.mm:75:5:
warning: 'NSOpenGLPixelBuffer' is deprecated: first deprecated in OS X
10.7 - Use GL_EXT_framebuffer_object instead [-Wdeprecated-declarations]
NSOpenGLPixelBuffer* pbuffer = [[NSOpenGLPixelBuffer alloc]
initWithTextureTarget: _traits->target textureInternalFormat:
_traits->format textureMaxMipMapLevel: _traits->level pixelsWide:
_traits->width pixelsHigh: _trai...
^
/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:139:12:
note: 'NSOpenGLPixelBuffer' has been explicitly marked deprecated here
@interface NSOpenGLPixelBuffer : NSObject
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/PixelBufferCocoa.mm:75:38:
warning: 'NSOpenGLPixelBuffer' is deprecated: first deprecated in OS X
10.7 - Use GL_EXT_framebuffer_object instead [-Wdeprecated-declarations]
NSOpenGLPixelBuffer* pbuffer = [[NSOpenGLPixelBuffer alloc]
initWithTextureTarget: _traits->target textureInternalFormat:
_traits->format textureMaxMipMapLevel: _traits->level pixelsWide:
_traits->width pixelsHigh: _trai...
^
/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:139:12:
note: 'NSOpenGLPixelBuffer' has been explicitly marked deprecated here
@interface NSOpenGLPixelBuffer : NSObject
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/PixelBufferCocoa.mm:75:65:
warning:
'initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:'
is deprecated: first deprecated in OS X 10.7
[-Wdeprecated-declarations]
NSOpenGLPixelBuffer* pbuffer = [[NSOpenGLPixelBuffer alloc]
initWithTextureTarget: _traits->target textureInternalFormat:
_traits->format textureMaxMipMapLevel: _traits->level pixelsWide:
_traits->width pixelsHigh: _trai...
^
/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:155:1:
note:
'initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:'
has been explicitly marked deprecated here
- (nullable instancetype)initWithTextureTarget:(GLenum)target
textureInternalFormat:(GLenum)format
textureMaxMipMapLevel:(GLint)maxLevel pixelsWide:(GLsizei)pixelsWide
pixelsHigh:(GLsizei)pixelsHigh NS_DEPRECATED_MAC(10_2, 1...
^
/Users/fberard/Downloads/osg_git/distrib/src/osgViewer/PixelBufferCocoa.mm:77:15:
warning: 'setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:'
is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
[_context setPixelBuffer: pbuffer cubeMapFace: _traits->face
mipMapLevel:_traits->level currentVirtualScreen: 0];
^
/System/Library/Frameworks/AppKit.framework/Headers/NSOpenGL.h:259:1:
note: 'setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:' has
been explicitly marked deprecated here
- (void)setPixelBuffer:(NSOpenGLPixelBuffer *)pixelBuffer
cubeMapFace:(GLenum)face mipMapLevel:(GLint)level
currentVirtualScreen:(GLint)screen NS_DEPRECATED_MAC(10_3, 10_7); /* Use
IOSurface instead of NSOpenGLPixelBuffer o...
^
Thanks for the fix, works just fine under Linux w.r.t build and
testing. Now merged and checked into git master.
Next on to the others...
Robert.
On 3 June 2016 at 17:13, François Bérard <francoi...@imag.fr> wrote:
>> I can seen anywhere where the OSG Cmake build system is adding
>> -Wdeprecated-register. Are you adding this manually?
>
>
> nope. unzip, cmake, make. This must be a new default on my Clang (Apple LLVM
> version 7.3.0 (clang-703.0.29))
>
> I silenced the warnings by adding:
>
> add_compile_options(-Wno-deprecated-register)
Rather than add this to the root CMakeLists.txt file I have added a
Clang specific section to the src/osgPlugins/cfg/CMakeLists.txt thus:
# lex/yacc generated files use register that causes warnings with
CLang under OSX so disable this warnings.
IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wno-deprecated-register)
ENDIF()
This is now checked into master. Could remove you your own mds and test this?
> Doing so, the only warnings that remain are calls to deprecated OSX
> functions on 2 modules:
>
I will have to defer to yourself and other members of the OSG/OSX
community to suggest ways to resolve this warnings.
The two routes would seem to be to update the API usage so it's not
deprecated, this would the cleanest but could break backwards
compatibility if the new API's only exist in modern versions of the
OSX - we would need to check how far new API usage goes and decide as
a community whether this is far enough back. The other approach is to
see if we can disable these warnings, this is a bit hacky though...
For the OSG-3.5.3 dev release I'm happy to leave these deprecated
warnings in place and let the OSG/OSX community tackle the deprecated
warnings. The OSG/OSX isn't a large contingent so those who do use
the platform will be engage to make sure we don't end up breaking
things on certain OSX/iOS combinations.
Cheers,
I have removed the register keyword usage from
Matrix_implementation.cpp and added the "" to the CMakeLists.txt.
These changes are now checked into git mater.
Robert.
Could you post a log of the warnings that this CMakeLists.txt works
around? If there aren't too many we could just fix them.
Robert.
There are quite many, so IMHO we should just disable this warning for this subproject. But I is your call.
Here are the build log:
Code:
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(178): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(169): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(185): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(169): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(204): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(195): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(222): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_atmosphere.c(213): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_camera.c(149): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_camera.c(134): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_camera.c(155): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_camera.c(134): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(721): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(715): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(728): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(715): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(742): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(715): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(758): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(715): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(776): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(715): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(789): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(715): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(802): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(715): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(850): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(840): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(859): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(840): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(867): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(840): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(909): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_file.c(894): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(198): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(191): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(205): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(191): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(211): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(191): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(218): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(191): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(225): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(191): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(232): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(191): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(191): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(249): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(256): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(264): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(273): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(279): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(285): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(292): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(299): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(305): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(312): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_light.c(239): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(554): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(562): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(570): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(578): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(586): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(594): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(602): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(610): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(618): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(628): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(638): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(648): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(658): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(543): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(679): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(687): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(695): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(703): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(711): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(719): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(727): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(735): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(743): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(750): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(758): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(766): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(773): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(780): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(787): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(794): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(801): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(808): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(815): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(823): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(830): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(837): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(861): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_material.c(673): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(263): warning C4456: declaration of 'i' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(241): note: see declaration of 'i'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(283): warning C4456: declaration of 'i' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(241): note: see declaration of 'i'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(511): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(489): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(548): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(489): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(562): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(489): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(621): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(612): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(651): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(612): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(665): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_mesh.c(612): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(837): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(845): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(859): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(871): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(879): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(900): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(910): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(917): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(924): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(931): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(938): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(950): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(957): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(964): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(976): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(988): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(995): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(1007): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(1014): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(1021): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(1028): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(1035): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(1047): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_node.c(798): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(170): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(155): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(181): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(155): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(211): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(221): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(231): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(241): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(251): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(261): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(271): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(284): warning C4456: declaration of 'c' hides previous local declaration
openscenegraph\src\osgPlugins\3ds\lib3ds\lib3ds_viewport.c(204): note: see declaration of 'c'
Regards
Björn
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67452#67452
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
On 6 June 2016 at 13:55, Björn Blissing <bjorn.b...@vti.se> wrote:
> In the LUA-plugin:
>
>
> Code:
>
> d:\code\github\openscenegraph\src\osgplugins\lua\lua-5.2.3\src\lapi.c(1110): warning C4702: unreachable code
Removing the return statement that the warning is complaining about
would force a in the break method API. Could be a slippery slope of
changes required so I've just disabled the warning, at least tried to
using simple CMake entry to what you added to the 3ds plugin.
> 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.
This is 3rd party code that's integrated, we could fix or just disable
the warnings. If we modify the code we'd need to test it to make
sure. I'm not the original author of the code or a Windows hack so
I'll not personally dive in and start hacking with the code. If no
one else feels the urge then I'd suggest we just disable the warning.
The shadowing warning I've simply removed the second double as it's not needed.
> 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'
I've changed the code to simply use the osg::NodeList variant.
> 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.
I've changed the local name to parse_imageHelp to make sure it's using
the local one.
With these fixes now checked into master it should just be the OSC warning left.
Robert.
Do you have a githib account that you'd like me to credit with this
submissions? Where possible I've been utilizing the git commit
--author feature where I have the email address used on github.
Robert.
Tried compiling my own project with the latest master got some more warnings coming from included header files in OSG:
Code:
OpenSceneGraph\include\osgShadow/ViewDependentShadowTechnique(209): warning C4100: 'maxSize': unreferenced formal parameter
OpenSceneGraph\include\osg/GLObjects(64): warning C4100: 'fs': unreferenced formal parameter
OpenSceneGraph\include\osg/GLObjects(67): warning C4100: 'out': unreferenced formal parameter
OpenSceneGraph\include\osg/GLObjects(68): warning C4100: 'out': unreferenced formal parameter
Regards
Björn[/code]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67466#67466
I have just checked in a fix for these warnings.
Robert.
I've just created a LaurensVoerman account on github and cloned the osg
repro there.
That would probably have been a better starting point than a direct
local clone.
still struggling with git.
Regards, Laurens.