diff --git a/src/osgWidget/CMakeLists.txt b/src/osgWidget/CMakeLists.txt index c1716c21b..378a1a72f 100644 --- a/src/osgWidget/CMakeLists.txt +++ b/src/osgWidget/CMakeLists.txt @@ -4,6 +4,14 @@ ELSE() ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) 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(LIB_NAME osgWidget) SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME}) SET(TARGET_H diff --git a/src/osgWidget/Input.cpp b/src/osgWidget/Input.cpp index 420177a06..4458505e3 100644 --- a/src/osgWidget/Input.cpp +++ b/src/osgWidget/Input.cpp @@ -82,7 +82,8 @@ Input::Input(const std::string& name, const std::string& label, unsigned int siz _cursor->setDrawCallback( new BlinkCursorCallback(_insertMode) ); } -void Input::_calculateSize(const XYCoord& size) { +void Input::_calculateSize(const XYCoord& /*size*/) + { // An Input cannot currently set it's own size RELIABLY until the osgText implementation // is dratiscally improved. I'm getting wildly crazy results. :( // point_type height = size.y() > _cursor->getHeight() ? size.y() : _cursor->getHeight(); @@ -281,11 +282,12 @@ void Input::positioned() } } -bool Input::keyUp(int key, int mask, const WindowManager*) { +bool Input::keyUp(int /*key*/, int /*mask*/, const WindowManager*) +{ return false; } -bool Input::mouseDrag (double x, double y, const WindowManager*) +bool Input::mouseDrag (double x, double /*y*/, const WindowManager*) { _mouseClickX += x; x = _mouseClickX; @@ -306,7 +308,7 @@ bool Input::mouseDrag (double x, double y, const WindowManager*) return true; } -bool Input::mousePush (double x, double y, const WindowManager* wm) +bool Input::mousePush (double x, double /*y*/, const WindowManager* /*wm*/) { double offset = getOrigin().x(); Window* window = getParent(); diff --git a/src/osgWidget/Lua.cpp b/src/osgWidget/Lua.cpp index 9def84f2a..f55a31e9a 100644 --- a/src/osgWidget/Lua.cpp +++ b/src/osgWidget/Lua.cpp @@ -131,7 +131,7 @@ bool LuaEngine::close() { #endif } -bool LuaEngine::eval(const std::string& code) { +bool LuaEngine::eval(const std::string& /*code*/) { #ifdef OSGWIDGET_USELUA if(luaL_dostring(_data->lua, code.c_str())) { warn() << "LuaEngine::eval - " << lua_tostring(_data->lua, -1) << std::endl; @@ -146,7 +146,7 @@ bool LuaEngine::eval(const std::string& code) { #endif } -bool LuaEngine::runFile(const std::string& filePath) { +bool LuaEngine::runFile(const std::string& /*filePath*/) { #ifdef OSGWIDGET_USELUA if(!osgDB::fileExists(filePath)) { warn() << "Couldn't find file \"" << filePath << "\" for LuaEngine." << std::endl;