diff --git a/src/Main/FreeCADGuiPy.cpp b/src/Main/FreeCADGuiPy.cpp index dd2465e274..0ecc0d8a74 100644 --- a/src/Main/FreeCADGuiPy.cpp +++ b/src/Main/FreeCADGuiPy.cpp @@ -303,7 +303,7 @@ QWidget* setupMainWindow() try { Gui::initGuiAppPostMainWindow(true, *qApp, *mw, nullptr); } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { return nullptr; } diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 7597adef98..d7535402e4 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -3067,7 +3067,7 @@ App::Color CDxfRead::ObjectColor(ColorIndex_t index) result = App::Color(brightness, brightness, brightness); } else { - static const std::array fades = {1.00, 0.74, 0.50, 0.40, 0.30}; + static const std::array fades = {1.00F, 0.74F, 0.50F, 0.40F, 0.30F}; return wheel(index / 10 - 1, (index & 1) != 0 ? 0.69 : 0, fades[(index / 2) % 5]); } // TODO: These colors are modified to contrast with the background. In the original program diff --git a/src/Mod/Material/Gui/ModelSelect.cpp b/src/Mod/Material/Gui/ModelSelect.cpp index 82a17956fb..49a21057f8 100644 --- a/src/Mod/Material/Gui/ModelSelect.cpp +++ b/src/Mod/Material/Gui/ModelSelect.cpp @@ -476,7 +476,7 @@ void ModelSelect::onSelectModel(const QItemSelection& selected, const QItemSelec ui->standardButtons->button(QDialogButtonBox::Ok)->setEnabled(true); ui->buttonFavorite->setEnabled(true); } - catch (const std::exception& e) { + catch (const std::exception&) { _selected = QString::fromStdString(""); clearMaterialModel(); ui->standardButtons->button(QDialogButtonBox::Ok)->setEnabled(false); diff --git a/src/Mod/Part/Gui/TaskAttacher.ui b/src/Mod/Part/Gui/TaskAttacher.ui index fd4db0aec9..db16431302 100644 --- a/src/Mod/Part/Gui/TaskAttacher.ui +++ b/src/Mod/Part/Gui/TaskAttacher.ui @@ -135,9 +135,6 @@ In x-direction: - - labelOffset - diff --git a/src/Mod/PartDesign/App/Feature.cpp b/src/Mod/PartDesign/App/Feature.cpp index 63cc6e85ba..d679acd352 100644 --- a/src/Mod/PartDesign/App/Feature.cpp +++ b/src/Mod/PartDesign/App/Feature.cpp @@ -71,7 +71,7 @@ App::DocumentObjectExecReturn* Feature::recompute() return StdReturn; } } - catch (Base::Exception& e) { + catch (Base::Exception&) { //invalid BaseShape Suppressed.setValue(false); } diff --git a/src/Mod/Sketcher/App/planegcs/Geo.h b/src/Mod/Sketcher/App/planegcs/Geo.h index 4f78061a6e..c19a5d7ebd 100644 --- a/src/Mod/Sketcher/App/planegcs/Geo.h +++ b/src/Mod/Sketcher/App/planegcs/Geo.h @@ -27,6 +27,10 @@ #include #include "../../SketcherGlobal.h" +#ifdef _MSC_VER +#pragma warning(disable : 4251) +#endif + namespace GCS { class SketcherExport Point diff --git a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp index 41835ede72..7843cd9565 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp @@ -241,6 +241,8 @@ public: return isEndPointSelected; case Sketcher::PointPos::mid: return isMidPointSelected; + default: + return false; } } diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp index 7312a402a9..d84cbb314c 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp @@ -1099,7 +1099,7 @@ QGraphicsItem *QGIViewPart::getQGISubItemByName(const std::string &subName) cons scanType = QGIFace::Type; } } - catch (Base::ValueError& e) { + catch (Base::ValueError&) { // No action } if (!scanType) { @@ -1110,7 +1110,7 @@ QGraphicsItem *QGIViewPart::getQGISubItemByName(const std::string &subName) cons try { scanIndex = TechDraw::DrawUtil::getIndexFromName(subName); } - catch (Base::ValueError& e) { + catch (Base::ValueError&) { // No action } if (scanIndex < 0) {