From 5bfc7b99081d9b8153c77ffe3be5582f21ade123 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 2 Jul 2016 12:13:08 +0100 Subject: [PATCH] Fixed warning and quitened ones caused by 3rd party headers. --- src/osgPlugins/exr/CMakeLists.txt | 5 +++++ src/osgPlugins/exr/ReaderWriterEXR.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/exr/CMakeLists.txt b/src/osgPlugins/exr/CMakeLists.txt index ede75fc44..43894ff48 100644 --- a/src/osgPlugins/exr/CMakeLists.txt +++ b/src/osgPlugins/exr/CMakeLists.txt @@ -4,5 +4,10 @@ SET(TARGET_SRC ReaderWriterEXR.cpp ) SET(TARGET_LIBRARIES_VARS ${OPENEXR_LIBRARIES_VARS} ZLIB_LIBRARY) +IF(CMAKE_COMPILER_IS_GNUCXX) + # Remove -Wshadow flag as it barfs on ffmoeg headers + STRING(REGEX REPLACE "-Wshadow" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") +ENDIF() + #### end var setup ### SETUP_PLUGIN(exr) diff --git a/src/osgPlugins/exr/ReaderWriterEXR.cpp b/src/osgPlugins/exr/ReaderWriterEXR.cpp index caf47047e..afb471b2d 100644 --- a/src/osgPlugins/exr/ReaderWriterEXR.cpp +++ b/src/osgPlugins/exr/ReaderWriterEXR.cpp @@ -248,7 +248,7 @@ public: return WriteResult::ERROR_IN_WRITING_FILE; } protected: - bool writeEXRStream(const osg::Image &img, std::ostream& fout, const std::string &fileName) const + bool writeEXRStream(const osg::Image &img, std::ostream& fout, const std::string& /*fileName*/) const { bool writeOK = true;