From 6c2178d082fb45265de1ab42b3ec66d3c3714433 Mon Sep 17 00:00:00 2001 From: Uwe Date: Wed, 5 Jan 2022 12:26:48 +0100 Subject: [PATCH] [PD] get rid of a CI compiler warning (#5335) * [PD] get rid of a CI compiler warning The CI compiler outputs this warning: FeaturePad.cpp:101:20: warning: variable 'obj' set but not used [-Wunused-but-set-variable] Co-authored-by: 0penBrain <48731257+0penBrain@users.noreply.github.com> --- src/Mod/PartDesign/App/FeaturePad.cpp | 4 ++-- src/Mod/PartDesign/App/FeaturePocket.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp index 8b58918fa0..033891ebc6 100644 --- a/src/Mod/PartDesign/App/FeaturePad.cpp +++ b/src/Mod/PartDesign/App/FeaturePad.cpp @@ -98,10 +98,10 @@ App::DocumentObjectExecReturn *Pad::execute() Midplane.setReadOnly(hasReversed); Reversed.setReadOnly(hasMidplane); - Part::Feature* obj = 0; TopoDS_Shape sketchshape; try { - obj = getVerifiedObject(); + getVerifiedObject(); + sketchshape = getVerifiedFace(); } catch (const Base::Exception& e) { diff --git a/src/Mod/PartDesign/App/FeaturePocket.cpp b/src/Mod/PartDesign/App/FeaturePocket.cpp index 2263a0613a..329de73bdb 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.cpp +++ b/src/Mod/PartDesign/App/FeaturePocket.cpp @@ -98,10 +98,10 @@ App::DocumentObjectExecReturn *Pocket::execute() if ((std::string(Type.getValueAsString()) == "TwoLengths") && (L < Precision::Confusion())) return new App::DocumentObjectExecReturn("Pocket: Second length of pocket too small"); - Part::Feature* obj = 0; TopoDS_Shape profileshape; try { - obj = getVerifiedObject(); + getVerifiedObject(); + profileshape = getVerifiedFace(); } catch (const Base::Exception& e) { return new App::DocumentObjectExecReturn(e.what());