Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
+ fix various gcc & clang warnings
  • Loading branch information
wwmayer committed Apr 24, 2016
1 parent 6b4821a commit d03a8fd
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 80 deletions.
2 changes: 2 additions & 0 deletions src/App/Origin.cpp
Expand Up @@ -117,10 +117,12 @@ App::DocumentObjectExecReturn *Origin::execute(void) {
for (const char* role: AxisRoles) {
App::Line *axis = getAxis (role);
assert(axis);
(void)axis;
}
for (const char* role: PlaneRoles) {
App::Plane *plane = getPlane (role);
assert(plane);
(void)plane;
}
} catch (const Base::Exception &ex) {
setError ();
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Draft/App/dxf.cpp
Expand Up @@ -1193,7 +1193,7 @@ bool CDxfRead::ReadPolyLine()
bool closed = false;
int flags;
bool first_vertex_section_found = false;
double first_vertex[3];
double first_vertex[3] = {0,0,0};
bool bulge_found;
double bulge;

Expand Down
70 changes: 9 additions & 61 deletions src/Mod/Part/Gui/AttacherTexts.cpp

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/Mod/PartDesign/App/FeaturePrimitive.cpp
Expand Up @@ -54,7 +54,6 @@ using namespace PartDesign;

namespace PartDesign {

const App::PropertyQuantityConstraint::Constraints apexRange = {0.0,90.0,0.1};
const App::PropertyQuantityConstraint::Constraints torusRangeV = {-180.0,180.0,1.0};
const App::PropertyQuantityConstraint::Constraints angleRangeU = {0.0,360.0,1.0};
const App::PropertyQuantityConstraint::Constraints angleRangeV = {-90.0,90.0,1.0};
Expand Down
4 changes: 0 additions & 4 deletions src/Mod/PartDesign/App/FeatureThickness.cpp
Expand Up @@ -36,10 +36,6 @@ using namespace PartDesign;
const char* PartDesign::Thickness::ModeEnums[] = {"Skin","Pipe", "RectoVerso",NULL};
const char* PartDesign::Thickness::JoinEnums[] = {"Arc", "Intersection",NULL};

namespace PartDesign {
const App::PropertyQuantityConstraint::Constraints quantityRange = {0.0,FLT_MAX,0.1};
}

PROPERTY_SOURCE(PartDesign::Thickness, PartDesign::DressUp)

Thickness::Thickness()
Expand Down
3 changes: 1 addition & 2 deletions src/Mod/PartDesign/Gui/TaskFeaturePick.h
Expand Up @@ -67,11 +67,10 @@ class TaskFeaturePick : public Gui::TaskView::TaskBox, public Gui::SelectionObse
protected Q_SLOTS:
void onUpdate(bool);
void onSelectionChanged(const Gui::SelectionChanges& msg);

private:
Ui_TaskFeaturePick* ui;
QWidget* proxy;
SoSwitch* featureswitch;
std::vector<Gui::ViewProviderOrigin*> origins;

std::vector<QString> features;
Expand Down
20 changes: 10 additions & 10 deletions src/Mod/PartDesign/Gui/Utils.cpp
Expand Up @@ -133,16 +133,16 @@ App::Part* getPartFor(const App::DocumentObject* obj, bool messageIfNot) {
return nullptr;
}

static void buildDefaultPartAndBody(const App::Document* doc)
{
// This adds both the base planes and the body
std::string PartName = doc->getUniqueObjectName("Part");
//// create a PartDesign Part for now, can be later any kind of Part or an empty one
Gui::Command::addModule(Gui::Command::Doc, "PartDesignGui");
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().Tip = App.activeDocument().addObject('App::Part','%s')", PartName.c_str());
Gui::Command::doCommand(Gui::Command::Doc, "PartDesignGui.setUpPart(App.activeDocument().%s)", PartName.c_str());
Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeView().setActiveObject('Part',App.activeDocument().%s)", PartName.c_str());
}
//static void buildDefaultPartAndBody(const App::Document* doc)
//{
// // This adds both the base planes and the body
// std::string PartName = doc->getUniqueObjectName("Part");
// //// create a PartDesign Part for now, can be later any kind of Part or an empty one
// Gui::Command::addModule(Gui::Command::Doc, "PartDesignGui");
// Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().Tip = App.activeDocument().addObject('App::Part','%s')", PartName.c_str());
// Gui::Command::doCommand(Gui::Command::Doc, "PartDesignGui.setUpPart(App.activeDocument().%s)", PartName.c_str());
// Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeView().setActiveObject('Part',App.activeDocument().%s)", PartName.c_str());
//}


void fixSketchSupport (Sketcher::SketchObject* sketch)
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/PartDesign/Gui/ViewProviderDatum.cpp
Expand Up @@ -172,7 +172,7 @@ void ViewProviderDatum::setDisplayMode(const char* ModeName)
std::string ViewProviderDatum::getElement(const SoDetail* detail) const
{
if (detail) {
int element;
int element = 1;

if (detail->getTypeId() == SoLineDetail::getClassTypeId()) {
const SoLineDetail* line_detail = static_cast<const SoLineDetail*>(detail);
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Path/Gui/TaskDlgPathCompound.cpp
Expand Up @@ -109,6 +109,7 @@ TaskDlgPathCompound::TaskDlgPathCompound(PathGui::ViewProviderPathCompound *obj)
: TaskDialog(),CompoundView(obj)
{
assert(CompoundView);
(void)CompoundView; // fix clang warning
parameter = new TaskWidgetPathCompound(CompoundView);
Content.push_back(parameter);
}
Expand Down

0 comments on commit d03a8fd

Please sign in to comment.