diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c8c0cd68..b26ff8fae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) include(cMake/ConfigureChecks.cmake) configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) add_definitions(-DHAVE_CONFIG_H) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-write-strings") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated -Wno-write-strings") INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # get linker errors as soon as possible and not at runtime e.g. for modules if(UNIX) diff --git a/src/Base/Unit.cpp b/src/Base/Unit.cpp index b037ee283..d76dc42d3 100644 --- a/src/Base/Unit.cpp +++ b/src/Base/Unit.cpp @@ -338,7 +338,7 @@ QString Unit::getString(void) const Sig.ThermodynamicTemperature<0?1:2 + Sig.AmountOfSubstance<0?1:2 + Sig.LuminoseIntensity<0?1:2 + - Sig.Angle<0?1:2 ; + Sig.Angle<0?1:2 + Sig.Density<0?1:2 ; if (nnom > 1) ret << '('; bool mult=false; diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index 68fd0bef8..f1dc3b46f 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -494,7 +494,6 @@ StdCmdRevert::StdCmdRevert() void StdCmdRevert::activated(int iMsg) { - App::Document* doc = App::GetApplication().getActiveDocument(); QMessageBox msgBox; msgBox.setText(qApp->translate("Std_Revert","This will discard all the changes since last file save.")); msgBox.setInformativeText(qApp->translate("Std_Revert","Are you sure?")); @@ -1009,7 +1008,6 @@ void StdCmdDelete::activated(int iMsg) if (vpedit) { // check if the edited view provider is selected for (std::vector::iterator ft = sel.begin(); ft != sel.end(); ++ft) { - App::DocumentObject* obj = ft->getObject(); Gui::ViewProvider* vp = pGuiDoc->getViewProvider(ft->getObject()); if (vp == vpedit) { if (!ft->getSubNames().empty()) { @@ -1031,7 +1029,6 @@ void StdCmdDelete::activated(int iMsg) // check if we can delete the object for (std::vector::iterator ft = sel.begin(); ft != sel.end(); ++ft) { App::DocumentObject* obj = ft->getObject(); - Gui::ViewProvider* vp = pGuiDoc->getViewProvider(ft->getObject()); std::vector links = obj->getInList(); if (!links.empty()) { // check if the referenced objects are groups or are selected too diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index a6bf27956..74096bf7e 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -496,7 +496,7 @@ void Document::slotChangedObject(const App::DocumentObject& Obj, const App::Prop SoGroup* childGroup = viewProvider->getChildRoot(); // size not the same -> build up the list new - if(childGroup->getNumChildren() != children.size()){ + if(childGroup->getNumChildren() != static_cast(children.size())){ childGroup->removeAllChildren(); diff --git a/src/Gui/GestureNavigationStyle.cpp b/src/Gui/GestureNavigationStyle.cpp index e29bf1ffe..4f148e738 100644 --- a/src/Gui/GestureNavigationStyle.cpp +++ b/src/Gui/GestureNavigationStyle.cpp @@ -294,6 +294,8 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) } } break; + default: + break; } } if (processed) @@ -343,6 +345,8 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) } processed = TRUE; break; + default: + break; }//switch key } if (processed) @@ -474,8 +478,8 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) if (evIsButton) { const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev; const int button = event->getButton(); - const SbBool press //the button was pressed (if false -> released) - = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; + //const SbBool press //the button was pressed (if false -> released) + // = event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE; switch(button){ case SoMouseButtonEvent::BUTTON1: case SoMouseButtonEvent::BUTTON2: @@ -495,7 +499,7 @@ SbBool GestureNavigationStyle::processSoEvent(const SoEvent * const ev) //the essence part 1! //mouse movement into camera motion. Suppress if in gesture. Ignore until threshold is surpassed. if (evIsLoc2 && ! this->inGesture && this->mouseMoveThresholdBroken) { - const SoLocation2Event * const event = (const SoLocation2Event *) ev; + //const SoLocation2Event * const event = (const SoLocation2Event *) ev; if (curmode == NavigationStyle::ZOOMING) {//doesn't happen this->zoomByCursor(posn, prevnormalized); processed = TRUE; diff --git a/src/Gui/Quarter/FocusHandler.cpp b/src/Gui/Quarter/FocusHandler.cpp index febf9634e..053ee3a75 100644 --- a/src/Gui/Quarter/FocusHandler.cpp +++ b/src/Gui/Quarter/FocusHandler.cpp @@ -66,6 +66,8 @@ FocusHandler::eventFilter(QObject * obj, QEvent * event) case QEvent::FocusOut: this->focusEvent("sim.coin3d.coin.InputFocus.OUT"); break; + default: + break; } return QObject::eventFilter(obj, event); } diff --git a/src/Gui/Quarter/ImageReader.cpp b/src/Gui/Quarter/ImageReader.cpp index 2f2ecae27..aec789e46 100644 --- a/src/Gui/Quarter/ImageReader.cpp +++ b/src/Gui/Quarter/ImageReader.cpp @@ -54,9 +54,9 @@ ImageReader::readImage(const SbString & filename, SbImage & sbimage) const { QImage image; if (image.load(filename.getString())) { - int c; - int w = image.width(); - int h = image.height(); + //int c; + //int w = image.width(); + //int h = image.height(); // Keep in 8-bits mode if that was what we read if (image.depth() != 8 || !image.isGrayscale()) { diff --git a/src/Gui/Quarter/QuarterWidgetP.cpp b/src/Gui/Quarter/QuarterWidgetP.cpp index cba357ccc..36685a909 100644 --- a/src/Gui/Quarter/QuarterWidgetP.cpp +++ b/src/Gui/Quarter/QuarterWidgetP.cpp @@ -76,13 +76,13 @@ QuarterWidgetP::QuarterWidgetP(QuarterWidget * masterptr, const QGLWidget * shar initialsoeventmanager(false), headlight(NULL), cachecontext(NULL), - contextmenu(NULL), contextmenuenabled(true), autoredrawenabled(true), interactionmodeenabled(false), clearzbuffer(true), clearwindow(true), - addactions(true) + addactions(true), + contextmenu(NULL) { this->cachecontext = findCacheContext(masterptr, sharewidget); diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index 59af63777..760e41351 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -164,7 +164,7 @@ void TaskGroup::actionEvent (QActionEvent* e) switch (e->type()) { case QEvent::ActionAdded: { - QSint::ActionLabel *label = this->createItem(action); + this->createItem(action); break; } case QEvent::ActionChanged: diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 7309cdfba..62db9d913 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -1297,9 +1297,6 @@ void View3DInventorViewer::setRenderType(const RenderType type) break; case Image: { - const SbViewportRegion vp = this->getSoRenderManager()->getViewportRegion(); - SbVec2s size = vp.getViewportSizePixels(); - QGLWidget* gl = static_cast(this->viewport()); gl->makeCurrent(); int w = gl->width(); diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 47932bb37..36adb58a7 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -1709,7 +1709,7 @@ QVariant PropertyEnumItem::value(const App::Property* prop) const const std::vector& value = prop_enum->getEnumVector(); long currentItem = prop_enum->getValue(); - if (currentItem < 0 || currentItem >= value.size()) + if (currentItem < 0 || currentItem >= static_cast(value.size())) return QVariant(QString()); return QVariant(QString::fromUtf8(value[currentItem].c_str())); } diff --git a/src/Mod/Mesh/App/Core/Projection.cpp b/src/Mod/Mesh/App/Core/Projection.cpp index ef7c7b681..aaf34ba80 100644 --- a/src/Mod/Mesh/App/Core/Projection.cpp +++ b/src/Mod/Mesh/App/Core/Projection.cpp @@ -396,7 +396,7 @@ bool MeshProjection::projectLineOnMesh(const MeshFacetGrid& grid, // cut all facets with plane std::list< std::pair > cutLine; - unsigned long start = 0, end = 0; + //unsigned long start = 0, end = 0; for (std::vector::iterator it = facets.begin(); it != facets.end(); ++it) { Base::Vector3f e1, e2; MeshGeomFacet tria = kernel.GetFacet(*it); @@ -418,7 +418,7 @@ bool MeshProjection::projectLineOnMesh(const MeshFacetGrid& grid, else cutLine.push_back(std::pair(v1, e1)); - start = it - facets.begin(); + //start = it - facets.begin(); } if (*it == f2) { // end facet @@ -427,7 +427,7 @@ bool MeshProjection::projectLineOnMesh(const MeshFacetGrid& grid, else cutLine.push_back(std::pair(v2, e1)); - end = it - facets.begin(); + //end = it - facets.begin(); } } } diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index 481a1c9bd..3af9e8c5e 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -568,10 +568,10 @@ bool ViewProviderMesh::exportToVrml(const char* filename, const MeshCore::Materi SoMaterialBinding* binding = new SoMaterialBinding; SoMaterial* material = new SoMaterial; - if (mat.diffuseColor.size() == coords->point.getNum()) { + if (static_cast(mat.diffuseColor.size()) == coords->point.getNum()) { binding->value = SoMaterialBinding::PER_VERTEX_INDEXED; } - else if (mat.diffuseColor.size() == faces->coordIndex.getNum()/4) { + else if (static_cast(mat.diffuseColor.size()) == faces->coordIndex.getNum()/4) { binding->value = SoMaterialBinding::PER_FACE_INDEXED; } diff --git a/src/Mod/Part/App/PrimitiveFeature.cpp b/src/Mod/Part/App/PrimitiveFeature.cpp index 676e68caf..dafefc9fe 100644 --- a/src/Mod/Part/App/PrimitiveFeature.cpp +++ b/src/Mod/Part/App/PrimitiveFeature.cpp @@ -826,7 +826,7 @@ App::DocumentObjectExecReturn *Helix::execute(void) Standard_Real myRadius = Radius.getValue(); Standard_Real myAngle = Angle.getValue(); Standard_Boolean myLocalCS = LocalCoord.getValue() ? Standard_True : Standard_False; - Standard_Boolean myStyle = Style.getValue() ? Standard_True : Standard_False; + //Standard_Boolean myStyle = Style.getValue() ? Standard_True : Standard_False; TopoShape helix; // work around for OCC bug #23314 (FC #0954) // the exact conditions for failure are unknown. building the helix 1 turn at a time diff --git a/src/Mod/Part/Gui/SoBrepFaceSet.cpp b/src/Mod/Part/Gui/SoBrepFaceSet.cpp index 0cbfeb5f1..935ef7475 100644 --- a/src/Mod/Part/Gui/SoBrepFaceSet.cpp +++ b/src/Mod/Part/Gui/SoBrepFaceSet.cpp @@ -866,6 +866,7 @@ void SoBrepFaceSet::renderShape(const SoGLCoordinateElement * const vertexlist, break; } v4 = viptr < viendptr ? *viptr++ : -1; + (void)v4; /* vertex 1 *********************************************************/ if (mbind == PER_PART) { diff --git a/src/Mod/Part/Gui/ViewProviderBoolean.cpp b/src/Mod/Part/Gui/ViewProviderBoolean.cpp index 748dece6f..43734ad34 100644 --- a/src/Mod/Part/Gui/ViewProviderBoolean.cpp +++ b/src/Mod/Part/Gui/ViewProviderBoolean.cpp @@ -106,7 +106,7 @@ void ViewProviderBoolean::updateData(const App::Property* prop) colBool.resize(boolMap.Extent(), this->ShapeColor.getValue()); bool setColor=false; - if (colBase.size() == baseMap.Extent()) { + if (static_cast(colBase.size()) == baseMap.Extent()) { applyColor(hist[0], colBase, colBool); setColor = true; } @@ -115,7 +115,7 @@ void ViewProviderBoolean::updateData(const App::Property* prop) applyColor(hist[0], colBase, colBool); setColor = true; } - if (colTool.size() == toolMap.Extent()) { + if (static_cast(colTool.size()) == toolMap.Extent()) { applyColor(hist[1], colTool, colBool); setColor = true; } @@ -199,7 +199,7 @@ void ViewProviderMultiFuse::updateData(const App::Property* prop) Gui::ViewProvider* vpBase = Gui::Application::Instance->getViewProvider(objBase); std::vector colBase = static_cast(vpBase)->DiffuseColor.getValues(); - if (colBase.size() == baseMap.Extent()) { + if (static_cast(colBase.size()) == baseMap.Extent()) { applyColor(hist[index], colBase, colBool); setColor = true; } @@ -316,7 +316,7 @@ void ViewProviderMultiCommon::updateData(const App::Property* prop) Gui::ViewProvider* vpBase = Gui::Application::Instance->getViewProvider(objBase); std::vector colBase = static_cast(vpBase)->DiffuseColor.getValues(); - if (colBase.size() == baseMap.Extent()) { + if (static_cast(colBase.size()) == baseMap.Extent()) { applyColor(hist[index], colBase, colBool); setColor = true; } diff --git a/src/Mod/Part/Gui/ViewProviderCompound.cpp b/src/Mod/Part/Gui/ViewProviderCompound.cpp index 3fccded18..a9f42b5ce 100644 --- a/src/Mod/Part/Gui/ViewProviderCompound.cpp +++ b/src/Mod/Part/Gui/ViewProviderCompound.cpp @@ -92,7 +92,7 @@ void ViewProviderCompound::updateData(const App::Property* prop) Gui::ViewProvider* vpBase = Gui::Application::Instance->getViewProvider(objBase); std::vector baseCol = static_cast(vpBase)->DiffuseColor.getValues(); - if (baseCol.size() == baseMap.Extent()) { + if (static_cast(baseCol.size()) == baseMap.Extent()) { applyColor(hist[index], baseCol, compCol); setColor = true; } diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index 3cc46fcd1..1ee28cbc6 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -762,7 +762,6 @@ void ViewProviderPartExt::updateVisual(const TopoDS_Shape& inputShape) bounds.Get(xMin, yMin, zMin, xMax, yMax, zMax); Standard_Real deflection = ((xMax-xMin)+(yMax-yMin)+(zMax-zMin))/300.0 * Deviation.getValue(); - Standard_Real AngDeflectionRads = AngularDeflection.getValue() / 180.0 * M_PI; // create or use the mesh on the data structure #if OCC_VERSION_HEX >= 0x060600 diff --git a/src/Mod/Part/Gui/ViewProviderMirror.cpp b/src/Mod/Part/Gui/ViewProviderMirror.cpp index ba1eb2d02..b021928ec 100644 --- a/src/Mod/Part/Gui/ViewProviderMirror.cpp +++ b/src/Mod/Part/Gui/ViewProviderMirror.cpp @@ -253,7 +253,7 @@ void ViewProviderFillet::updateData(const App::Property* prop) colFill.resize(fillMap.Extent(), static_cast(vpBase)->ShapeColor.getValue()); bool setColor=false; - if (colBase.size() == baseMap.Extent()) { + if (static_cast(colBase.size()) == baseMap.Extent()) { applyColor(hist[0], colBase, colFill); setColor = true; } @@ -356,7 +356,7 @@ void ViewProviderChamfer::updateData(const App::Property* prop) colCham.resize(chamMap.Extent(), static_cast(vpBase)->ShapeColor.getValue()); bool setColor=false; - if (colBase.size() == baseMap.Extent()) { + if (static_cast(colBase.size()) == baseMap.Extent()) { applyColor(hist[0], colBase, colCham); setColor = true; } diff --git a/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp b/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp index 8e7077da4..f3e7b5623 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp @@ -250,7 +250,6 @@ void ViewProviderTransformed::recomputeFeature(void) bounds.Get(xMin, yMin, zMin, xMax, yMax, zMax); } Standard_Real deflection = ((xMax-xMin)+(yMax-yMin)+(zMax-zMin))/300.0 * Deviation.getValue(); - Standard_Real AngDeflectionRads = AngularDeflection.getValue() / 180.0 * M_PI; // create or use the mesh on the data structure #if OCC_VERSION_HEX >= 0x060600