From 2206e1cd7f05353ab668dac0e3f98a73437a770e Mon Sep 17 00:00:00 2001 From: Eivind Kvedalen Date: Thu, 17 Sep 2015 18:47:58 +0200 Subject: [PATCH] Added -Wno-sign-compare -Wno-reorder -Wno-switch -Wno-unused-variable -Wno-unused-but-set-variable -Wno-comment to mask warnings when compiling salomesmesh. --- src/3rdParty/salomesmesh/CMakeLists.txt | 2 ++ src/Mod/Spreadsheet/App/Sheet.cpp | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/3rdParty/salomesmesh/CMakeLists.txt b/src/3rdParty/salomesmesh/CMakeLists.txt index 972c079e7..ff6fc5982 100644 --- a/src/3rdParty/salomesmesh/CMakeLists.txt +++ b/src/3rdParty/salomesmesh/CMakeLists.txt @@ -6,6 +6,8 @@ SET(SMESH_VERSION_MINOR 1) SET(SMESH_VERSION_PATCH 2) SET(SMESH_VERSION_TWEAK 2) +set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-reorder -Wno-switch -Wno-unused-variable -Wno-unused-but-set-variable -Wno-comment") + CMAKE_MINIMUM_REQUIRED(VERSION 2.6) include_directories( diff --git a/src/Mod/Spreadsheet/App/Sheet.cpp b/src/Mod/Spreadsheet/App/Sheet.cpp index 81a767c6d..4ca5395be 100644 --- a/src/Mod/Spreadsheet/App/Sheet.cpp +++ b/src/Mod/Spreadsheet/App/Sheet.cpp @@ -585,8 +585,6 @@ void Sheet::updateAlias(CellAddress key) void Sheet::updateProperty(CellAddress key) { - const Property * prop; - Cell * cell = getCell(key); if (cell != 0) { @@ -609,12 +607,12 @@ void Sheet::updateProperty(CellAddress key) if (freecad_dynamic_cast(output)) { NumberExpression * number = static_cast(output); if (number->getUnit().isEmpty()) - prop = setFloatProperty(key, number->getValue()); + setFloatProperty(key, number->getValue()); else - prop = setQuantityProperty(key, number->getValue(), number->getUnit()); + setQuantityProperty(key, number->getValue(), number->getUnit()); } else - prop = setStringProperty(key, freecad_dynamic_cast(output)->getText().c_str()); + setStringProperty(key, freecad_dynamic_cast(output)->getText().c_str()); delete output; } @@ -622,7 +620,6 @@ void Sheet::updateProperty(CellAddress key) clear(key); cellUpdated(key); - (void)prop; } /**