From 636fa43c9912fb07f13cb558737c0cf652da879e Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 12 Jun 2024 08:38:49 +0200 Subject: [PATCH] MSVC: Fix warnings and build failure --- src/Gui/DlgExpressionInput.cpp | 2 +- src/Gui/SoDatumLabel.cpp | 2 +- src/Mod/Fem/App/PreCompiled.h | 1 + src/Mod/PartDesign/App/FeatureLoft.cpp | 2 +- src/Mod/PartDesign/App/FeaturePrimitive.cpp | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Gui/DlgExpressionInput.cpp b/src/Gui/DlgExpressionInput.cpp index 37a08305d2..632f1a29df 100644 --- a/src/Gui/DlgExpressionInput.cpp +++ b/src/Gui/DlgExpressionInput.cpp @@ -732,7 +732,7 @@ void DlgExpressionInput::updateVarSetInfo(bool checkExpr) checkExpression(ui->expression->text()); ui->okBtn->setEnabled(true); } - catch (Base::Exception& e) { + catch (Base::Exception&) { ui->okBtn->setDisabled(true); } } diff --git a/src/Gui/SoDatumLabel.cpp b/src/Gui/SoDatumLabel.cpp index 256e9d14cd..b0fb49f666 100644 --- a/src/Gui/SoDatumLabel.cpp +++ b/src/Gui/SoDatumLabel.cpp @@ -1496,7 +1496,7 @@ void SoDatumLabel::drawArcLength(const SbVec3f* points, float& angle, SbVec3f& t float startangle = atan2f(vc1[1], vc1[0]); float endangle = atan2f(vc2[1], vc2[0]); if (endangle < startangle) { - endangle += 2. * M_PI; + endangle += 2. * (float)M_PI; } float radius = vc1.length(); diff --git a/src/Mod/Fem/App/PreCompiled.h b/src/Mod/Fem/App/PreCompiled.h index 6985462aab..1adfb01bb4 100644 --- a/src/Mod/Fem/App/PreCompiled.h +++ b/src/Mod/Fem/App/PreCompiled.h @@ -125,6 +125,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Mod/PartDesign/App/FeatureLoft.cpp b/src/Mod/PartDesign/App/FeatureLoft.cpp index 2a3612d3ba..f77482a1ad 100644 --- a/src/Mod/PartDesign/App/FeatureLoft.cpp +++ b/src/Mod/PartDesign/App/FeatureLoft.cpp @@ -523,7 +523,7 @@ App::DocumentObjectExecReturn *Loft::execute(void) try { boolOp.makeElementBoolean(maker, {base,result}); } - catch(Standard_Failure &e) { + catch(Standard_Failure&) { return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Failed to perform boolean operation")); } boolOp = this->getSolid(boolOp); diff --git a/src/Mod/PartDesign/App/FeaturePrimitive.cpp b/src/Mod/PartDesign/App/FeaturePrimitive.cpp index a0b07ba9b1..24a51b3836 100644 --- a/src/Mod/PartDesign/App/FeaturePrimitive.cpp +++ b/src/Mod/PartDesign/App/FeaturePrimitive.cpp @@ -126,7 +126,7 @@ App::DocumentObjectExecReturn* FeaturePrimitive::execute(const TopoDS_Shape& pri try { boolOp.makeElementBoolean(maker, {base, primitiveShape}); } - catch (Standard_Failure& e) { + catch (Standard_Failure&) { return new App::DocumentObjectExecReturn( QT_TRANSLATE_NOOP("Exception", "Failed to perform boolean operation")); }