diff --git a/src/App/Link.cpp b/src/App/Link.cpp index 1fbaed54fe..0f0649b767 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -2671,7 +2671,7 @@ Base::Placement Link::getPlacementOf(const std::string& sub, DocumentObject* tar } std::vector plcs = PlacementList.getValues(); - if (plcs.size() <= i) { + if (plcs.size() <= static_cast(i)) { return plc; } plc = plc * plcs[i]; diff --git a/src/App/Services.cpp b/src/App/Services.cpp index 4b021529df..47f9aac0bc 100644 --- a/src/App/Services.cpp +++ b/src/App/Services.cpp @@ -29,7 +29,7 @@ App::NullCenterOfMass::ofDocumentObject([[maybe_unused]] DocumentObject* object) return std::nullopt; } -bool App::NullCenterOfMass::supports(DocumentObject* object) const +bool App::NullCenterOfMass::supports(DocumentObject* /*object*/) const { return false; } \ No newline at end of file diff --git a/src/Gui/DAGView/DAGModel.cpp b/src/Gui/DAGView/DAGModel.cpp index 5b4af951d7..4575d8f5bb 100644 --- a/src/Gui/DAGView/DAGModel.cpp +++ b/src/Gui/DAGView/DAGModel.cpp @@ -496,9 +496,6 @@ void Model::updateSlot() // sync scene items for graph edge. BGL_FORALL_EDGES(currentEdge, *theGraph, Graph) { - Vertex source = boost::source(currentEdge, *theGraph); - Vertex target = boost::target(currentEdge, *theGraph); - if (!(*theGraph)[currentEdge].connector->scene()) { this->addItem((*theGraph)[currentEdge].connector.get()); } diff --git a/src/Gui/Dialogs/DlgExpressionInput.cpp b/src/Gui/Dialogs/DlgExpressionInput.cpp index e3bc97ab5e..e82d016017 100644 --- a/src/Gui/Dialogs/DlgExpressionInput.cpp +++ b/src/Gui/Dialogs/DlgExpressionInput.cpp @@ -1058,7 +1058,8 @@ void DlgExpressionInput::setMsgText() // elide text if it is going out of widget bounds // note: this is only 'rough elide', as this text is usually not very long; const int msgLinesLimit = 3; - if (wrappedMsg.size() > msgContentWidth / msgFontMetrics.averageCharWidth() * msgLinesLimit) { + if (static_cast(wrappedMsg.size()) + > msgContentWidth / msgFontMetrics.averageCharWidth() * msgLinesLimit) { const QString elidedMsg = msgFontMetrics.elidedText( QString::fromStdString(wrappedMsg), Qt::ElideRight, diff --git a/src/Gui/Dialogs/DlgThemeEditor.h b/src/Gui/Dialogs/DlgThemeEditor.h index b0c634f8ac..4989eca631 100644 --- a/src/Gui/Dialogs/DlgThemeEditor.h +++ b/src/Gui/Dialogs/DlgThemeEditor.h @@ -94,7 +94,7 @@ public: std::optional get(const std::string& name) const override; void reset(); - void flush(); + void flush() override; int rowCount(const QModelIndex& index) const override; int columnCount(const QModelIndex& index) const override; diff --git a/src/Mod/Assembly/App/AssemblyLink.cpp b/src/Mod/Assembly/App/AssemblyLink.cpp index f61537f515..48d3857d21 100644 --- a/src/Mod/Assembly/App/AssemblyLink.cpp +++ b/src/Mod/Assembly/App/AssemblyLink.cpp @@ -323,7 +323,7 @@ void AssemblyLink::synchronizeComponents() = srcLink->ElementList.getValues(); const std::vector newElements = link2->ElementList.getValues(); - for (int i = 0; i < srcElements.size(); ++i) { + for (size_t i = 0; i < srcElements.size(); ++i) { objLinkMap[srcElements[i]] = newElements[i]; } break; @@ -373,7 +373,7 @@ void AssemblyLink::synchronizeComponents() newLink->ElementCount.setValue(srcLink->ElementCount.getValue()); const std::vector srcElements = srcLink->ElementList.getValues(); const std::vector newElements = newLink->ElementList.getValues(); - for (int i = 0; i < srcElements.size(); ++i) { + for (size_t i = 0; i < srcElements.size(); ++i) { auto* newObj = newElements[i]; auto* srcObj = srcElements[i]; if (newObj && srcObj) { diff --git a/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp b/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp index 418cbb1084..7d56b9628f 100644 --- a/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp +++ b/src/Mod/Assembly/Gui/TaskAssemblyMessages.cpp @@ -69,7 +69,7 @@ void TaskAssemblyMessages::updateToolTip(const QString& link) } } -void TaskAssemblyMessages::onLabelStatusLinkClicked(const QString& str) +void TaskAssemblyMessages::onLabelStatusLinkClicked(const QString& /*str*/) { // The commands are not implemented yet since App is not reporting yet the solver's status /* if (str == QStringLiteral("#conflicting")) { diff --git a/src/Mod/Assembly/Gui/TaskAssemblyMessages.h b/src/Mod/Assembly/Gui/TaskAssemblyMessages.h index 2a2892b843..ae95138c0d 100644 --- a/src/Mod/Assembly/Gui/TaskAssemblyMessages.h +++ b/src/Mod/Assembly/Gui/TaskAssemblyMessages.h @@ -44,7 +44,7 @@ public: private: void onLabelStatusLinkClicked(const QString&) override; - void updateToolTip(const QString& link); + void updateToolTip(const QString& link) override; protected: ViewProviderAssembly* vp; diff --git a/src/Mod/Assembly/Gui/ViewProviderAssembly.h b/src/Mod/Assembly/Gui/ViewProviderAssembly.h index 76a2dabdd4..e551a8e8a0 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssembly.h +++ b/src/Mod/Assembly/Gui/ViewProviderAssembly.h @@ -284,7 +284,6 @@ private: std::set& visited ); - TaskAssemblyMessages* taskSolver; boost::signals2::connection connectSolverUpdate; boost::signals2::scoped_connection m_preTransactionConn; }; diff --git a/src/Mod/Measure/App/Measurement.cpp b/src/Mod/Measure/App/Measurement.cpp index 5e68309717..d44e441ca6 100644 --- a/src/Mod/Measure/App/Measurement.cpp +++ b/src/Mod/Measure/App/Measurement.cpp @@ -327,6 +327,7 @@ MeasureType Measurement::getType() TopoDS_Shape Measurement::getShape(App::DocumentObject* obj, const char* subName, TopAbs_ShapeEnum hint) const { + (void)hint; return Part::Feature::getShape( obj, Part::ShapeOption::NeedSubElement | Part::ShapeOption::ResolveLink diff --git a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp index 5a1b27a1a4..472e65b73f 100644 --- a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp @@ -775,7 +775,6 @@ void TaskRevolutionParameters::setGizmoPositions() bool ret; if (isGroove) { - auto groove = getObject(); ret = getFeatureProps(getObject()); } else { diff --git a/src/Mod/Sketcher/Gui/Command.cpp b/src/Mod/Sketcher/Gui/Command.cpp index 082e69ad46..28af78476f 100644 --- a/src/Mod/Sketcher/Gui/Command.cpp +++ b/src/Mod/Sketcher/Gui/Command.cpp @@ -1614,7 +1614,7 @@ void RenderingOrderAction::updateWidget() int midid = hGrp->GetInt("MidRenderGeometryId", 2); int lowid = hGrp->GetInt("LowRenderGeometryId", 3); - auto idToText = [this](int id) -> QString { + auto idToText = [](int id) -> QString { switch (id) { case 1: return tr("Normal geometry"); diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index c5bc4a4c4b..07bbb108bd 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -1034,8 +1034,9 @@ public: Gui::Selection().rmvSelectionGate(); } - void mouseMove(SnapManager::SnapHandle snapHandle) override - {} + void mouseMove(SnapManager::SnapHandle /*snapHandle*/) override + { + } bool pressButton(Base::Vector2d /*onSketchPos*/) override { diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h index 546903c1d4..90bf54fc9d 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h @@ -298,7 +298,7 @@ private: return line; } - Part::Geometry* curveToCircleOrArc(BRepAdaptor_Curve curve, const TopoDS_Edge& edge) + Part::Geometry* curveToCircleOrArc(BRepAdaptor_Curve curve, const TopoDS_Edge& /*edge*/) { gp_Circ circle = curve.Circle(); gp_Pnt cnt = circle.Location(); @@ -330,7 +330,7 @@ private: } } - Part::Geometry* curveToEllipseOrArc(BRepAdaptor_Curve curve, const TopoDS_Edge& edge) + Part::Geometry* curveToEllipseOrArc(BRepAdaptor_Curve curve, const TopoDS_Edge& /*edge*/) { gp_Elips ellipse = curve.Ellipse(); gp_Pnt beg = curve.Value(curve.FirstParameter()); diff --git a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp index 56a7cf5ef9..1f190b24f2 100644 --- a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp +++ b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp @@ -121,11 +121,9 @@ void EditModeCoinManager::ParameterObserver::initParameters() [this](const std::string& param) { updateConstraintPresentationParameters(param); }}, {"DimensionalStringFormat", [this](const std::string& param) { updateConstraintPresentationParameters(param); }}, - {"ViewScalingFactor", - [this](const std::string& param) { Client.updateElementSizeParameters(); }}, - {"MarkerSize", [this](const std::string& param) { Client.updateElementSizeParameters(); }}, - {"EditSketcherFontSize", - [this](const std::string& param) { Client.updateElementSizeParameters(); }}, + {"ViewScalingFactor", [this](const std::string&) { Client.updateElementSizeParameters(); }}, + {"MarkerSize", [this](const std::string&) { Client.updateElementSizeParameters(); }}, + {"EditSketcherFontSize", [this](const std::string&) { Client.updateElementSizeParameters(); }}, {"EdgeWidth", [this, &drawingParameters = Client.drawingParameters](const std::string& param) { updateWidth(drawingParameters.CurveWidth, param, 2); diff --git a/src/Mod/TechDraw/App/DrawComplexSection.cpp b/src/Mod/TechDraw/App/DrawComplexSection.cpp index 2846af7ecb..2065c0926e 100644 --- a/src/Mod/TechDraw/App/DrawComplexSection.cpp +++ b/src/Mod/TechDraw/App/DrawComplexSection.cpp @@ -1558,13 +1558,13 @@ DrawComplexSection::findNormalForFace(const TopoDS_Face& face, const std::vector>& normalKV, const std::vector& segmentEdges) { - int index = getSegmentIndex(face, segmentEdges); + size_t index = getSegmentIndex(face, segmentEdges); if (index < 0 || index >= segmentEdges.size()) { //NOLINT throw Base::RuntimeError("DCS::findNormalForFace - did not find normal for face!"); } for (auto& keyValue : normalKV) { - if (keyValue.first == index) { + if (static_cast(keyValue.first) == index) { return keyValue; } } diff --git a/src/Mod/TechDraw/Gui/QGIView.cpp b/src/Mod/TechDraw/Gui/QGIView.cpp index 0f3ca64fc1..19b0574b6d 100644 --- a/src/Mod/TechDraw/Gui/QGIView.cpp +++ b/src/Mod/TechDraw/Gui/QGIView.cpp @@ -74,8 +74,6 @@ using namespace TechDrawGui; using namespace TechDraw; using DU = DrawUtil; -const float labelCaptionFudge = 0.2f; // temp fiddle for devel - QGIView::QGIView() :QGraphicsItemGroup(), m_isHovered(false),