From bfff44ac9da5744fd6c65102fc3c9d806a19e7f4 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 8 Jun 2016 09:01:47 +0100 Subject: [PATCH] Fixed unused parameter warning. --- .../osgAnimation/ReaderWriter.cpp | 16 ++++++++-------- .../osgAnimation/UpdateMaterial.cpp | 4 ++-- .../osgTerrain/GeometryTechnique.cpp | 4 ++-- .../osgVolume/FixedFunctionTechnique.cpp | 4 ++-- .../deprecated-dotosg/osgVolume/Property.cpp | 4 ++-- .../osgVolume/PropertyAdjustmentCallback.cpp | 4 ++-- .../osgVolume/RayTracedTechnique.cpp | 4 ++-- src/osgWrappers/serializers/CMakeLists.txt | 8 ++++++++ 8 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/osgWrappers/deprecated-dotosg/osgAnimation/ReaderWriter.cpp b/src/osgWrappers/deprecated-dotosg/osgAnimation/ReaderWriter.cpp index faf551c7d..add7f50fd 100644 --- a/src/osgWrappers/deprecated-dotosg/osgAnimation/ReaderWriter.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgAnimation/ReaderWriter.cpp @@ -126,11 +126,11 @@ RegisterDotOsgWrapperProxy g_BoneProxy -bool Skeleton_readLocalData(Object& obj, Input& fr) +bool Skeleton_readLocalData(Object& /*obj*/, Input& /*fr*/) { return false; } -bool Skeleton_writeLocalData(const Object& obj, Output& fr) +bool Skeleton_writeLocalData(const Object& /*obj*/, Output& /*fr*/) { return true; } @@ -1009,13 +1009,13 @@ RegisterDotOsgWrapperProxy g_osgAnimationMorphGeometryProxy -bool UpdateBone_readLocalData(Object& obj, Input& fr) +bool UpdateBone_readLocalData(Object& /*obj*/, Input& /*fr*/) { bool iteratorAdvanced = false; return iteratorAdvanced; } -bool UpdateBone_writeLocalData(const Object& obj, Output& fw) +bool UpdateBone_writeLocalData(const Object& /*obj*/, Output& /*fw*/) { return true; } @@ -1032,13 +1032,13 @@ RegisterDotOsgWrapperProxy g_UpdateBoneProxy -bool UpdateSkeleton_readLocalData(Object& obj, Input& fr) +bool UpdateSkeleton_readLocalData(Object& /*obj*/, Input& /*fr*/) { bool iteratorAdvanced = false; return iteratorAdvanced; } -bool UpdateSkeleton_writeLocalData(const Object& obj, Output& fw) +bool UpdateSkeleton_writeLocalData(const Object& /*obj*/, Output& /*fw*/) { return true; } @@ -1054,13 +1054,13 @@ RegisterDotOsgWrapperProxy g_UpdateSkeletonProxy ); -bool UpdateMorph_readLocalData(Object& obj, Input& fr) +bool UpdateMorph_readLocalData(Object& /*obj*/, Input& /*fr*/) { bool iteratorAdvanced = false; return iteratorAdvanced; } -bool UpdateMorph_writeLocalData(const Object& obj, Output& fw) +bool UpdateMorph_writeLocalData(const Object& /*obj*/, Output& /*fw*/) { return true; } diff --git a/src/osgWrappers/deprecated-dotosg/osgAnimation/UpdateMaterial.cpp b/src/osgWrappers/deprecated-dotosg/osgAnimation/UpdateMaterial.cpp index 8bc614cf4..858862c1c 100644 --- a/src/osgWrappers/deprecated-dotosg/osgAnimation/UpdateMaterial.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgAnimation/UpdateMaterial.cpp @@ -25,13 +25,13 @@ using namespace osg; using namespace osgDB; -bool UpdateMaterial_readLocalData(Object& obj, Input& fr) +bool UpdateMaterial_readLocalData(Object& /*obj*/, Input& /*fr*/) { bool iteratorAdvanced = false; return iteratorAdvanced; } -bool UpdateMaterial_writeLocalData(const Object& obj, Output& fw) +bool UpdateMaterial_writeLocalData(const Object& /*obj*/, Output& /*fw*/) { return true; } diff --git a/src/osgWrappers/deprecated-dotosg/osgTerrain/GeometryTechnique.cpp b/src/osgWrappers/deprecated-dotosg/osgTerrain/GeometryTechnique.cpp index 0f9347fe0..a1e9061ce 100644 --- a/src/osgWrappers/deprecated-dotosg/osgTerrain/GeometryTechnique.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgTerrain/GeometryTechnique.cpp @@ -26,14 +26,14 @@ REGISTER_DOTOSGWRAPPER(GeometryTechnique_Proxy) ); -bool GeometryTechnique_readLocalData(osg::Object& obj, osgDB::Input &fr) +bool GeometryTechnique_readLocalData(osg::Object& /*obj*/, osgDB::Input& /*fr*/) { //osgTerrain::GeometryTechnique& gt = static_cast(obj); bool itrAdvanced = false; return itrAdvanced; } -bool GeometryTechnique_writeLocalData(const osg::Object& obj, osgDB::Output& fw) +bool GeometryTechnique_writeLocalData(const osg::Object& /*obj*/, osgDB::Output& /*fw*/) { //const osgTerrain::GeometryTechnique& gt = static_cast(obj); return true; diff --git a/src/osgWrappers/deprecated-dotosg/osgVolume/FixedFunctionTechnique.cpp b/src/osgWrappers/deprecated-dotosg/osgVolume/FixedFunctionTechnique.cpp index 38a67069c..a9908fbca 100644 --- a/src/osgWrappers/deprecated-dotosg/osgVolume/FixedFunctionTechnique.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgVolume/FixedFunctionTechnique.cpp @@ -26,14 +26,14 @@ REGISTER_DOTOSGWRAPPER(FixedFunctionTechnique_Proxy) ); -bool FixedFunctionTechnique_readLocalData(osg::Object& obj, osgDB::Input &fr) +bool FixedFunctionTechnique_readLocalData(osg::Object& /*obj*/, osgDB::Input& /*fr*/) { //osgVolume::FixedFunctionTechnique& fft = static_cast(obj); bool itrAdvanced = false; return itrAdvanced; } -bool FixedFunctionTechnique_writeLocalData(const osg::Object& obj, osgDB::Output& fw) +bool FixedFunctionTechnique_writeLocalData(const osg::Object& /*obj*/, osgDB::Output& /*fw*/) { //const osgVolume::FixedFunctionTechnique& fft = static_cast(obj); return true; diff --git a/src/osgWrappers/deprecated-dotosg/osgVolume/Property.cpp b/src/osgWrappers/deprecated-dotosg/osgVolume/Property.cpp index f578cda48..f3759d2c7 100644 --- a/src/osgWrappers/deprecated-dotosg/osgVolume/Property.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgVolume/Property.cpp @@ -43,12 +43,12 @@ REGISTER_DOTOSGWRAPPER(LightingProperty_Proxy) Property_writeLocalData ); -bool Property_readLocalData(osg::Object& obj, osgDB::Input &fr) +bool Property_readLocalData(osg::Object& /*obj*/, osgDB::Input& /*fr*/) { return false; } -bool Property_writeLocalData(const osg::Object& obj, osgDB::Output& fw) +bool Property_writeLocalData(const osg::Object& /*obj*/, osgDB::Output& /*fw*/) { return true; } diff --git a/src/osgWrappers/deprecated-dotosg/osgVolume/PropertyAdjustmentCallback.cpp b/src/osgWrappers/deprecated-dotosg/osgVolume/PropertyAdjustmentCallback.cpp index 83bb1c1d6..d661d26e8 100644 --- a/src/osgWrappers/deprecated-dotosg/osgVolume/PropertyAdjustmentCallback.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgVolume/PropertyAdjustmentCallback.cpp @@ -26,12 +26,12 @@ REGISTER_DOTOSGWRAPPER(PropertyAdjustmentCallback_Proxy) ); -bool PropertyAdjustmentCallback_readLocalData(osg::Object& obj, osgDB::Input &fr) +bool PropertyAdjustmentCallback_readLocalData(osg::Object& /*obj*/, osgDB::Input& /*fr*/) { return false; } -bool PropertyAdjustmentCallback_writeLocalData(const osg::Object& obj, osgDB::Output& fw) +bool PropertyAdjustmentCallback_writeLocalData(const osg::Object& /*obj*/, osgDB::Output& /*fw*/) { return true; } diff --git a/src/osgWrappers/deprecated-dotosg/osgVolume/RayTracedTechnique.cpp b/src/osgWrappers/deprecated-dotosg/osgVolume/RayTracedTechnique.cpp index 8e57efc3e..ae8b5d28d 100644 --- a/src/osgWrappers/deprecated-dotosg/osgVolume/RayTracedTechnique.cpp +++ b/src/osgWrappers/deprecated-dotosg/osgVolume/RayTracedTechnique.cpp @@ -26,14 +26,14 @@ REGISTER_DOTOSGWRAPPER(RayTracedTechnique_Proxy) ); -bool RayTracedTechnique_readLocalData(osg::Object& obj, osgDB::Input &fr) +bool RayTracedTechnique_readLocalData(osg::Object& /*obj*/, osgDB::Input& /*fr*/) { //osgVolume::RayTracedTechnique& st = static_cast(obj); bool itrAdvanced = false; return itrAdvanced; } -bool RayTracedTechnique_writeLocalData(const osg::Object& obj, osgDB::Output& fw) +bool RayTracedTechnique_writeLocalData(const osg::Object& /*obj*/, osgDB::Output& /*fw*/) { //const osgVolume::RayTracedTechnique& st = static_cast(obj); return true; diff --git a/src/osgWrappers/serializers/CMakeLists.txt b/src/osgWrappers/serializers/CMakeLists.txt index ab396dfbe..22d49e354 100644 --- a/src/osgWrappers/serializers/CMakeLists.txt +++ b/src/osgWrappers/serializers/CMakeLists.txt @@ -28,6 +28,14 @@ IF(MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zp16") ENDIF() +################################################################################ +## Quieten warnings that a due to optional code paths + +IF(CMAKE_COMPILER_IS_GNUCXX) + # Remove -Wextra flag as it barfs on ffmoeg headers + STRING(REGEX REPLACE "-Wextra" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +ENDIF() + SET(TARGET_DEFAULT_PREFIX "osgdb_serializers_") SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins osg serializer") SET(TARGET_COMMON_LIBRARIES