diff --git a/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp b/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp index 1192c0ad09..6decc0733a 100644 --- a/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp +++ b/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp @@ -20,6 +20,12 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor" +# pragma clang diagnostic ignored "-Winconsistent-missing-override" +#endif + #include "SMESH_ControlsDef.hxx" #include "SMDS_BallElement.hxx" @@ -4765,3 +4771,7 @@ bool TMeshModifTracer::IsMeshModified() } return modified; } + +#if defined(__clang__) +# pragma clang diagnostic pop +#endif diff --git a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp index 4ac6fd7687..61c8e751d9 100644 --- a/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp +++ b/src/3rdParty/salomesmesh/src/SMDS/SMDS_Mesh.cpp @@ -26,6 +26,11 @@ #pragma warning(disable:4786) #endif +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Winconsistent-missing-override" +#endif + #include "SMDS_FaceOfEdges.hxx" #include "SMDS_FaceOfNodes.hxx" #include "SMDS_Mesh.hxx" @@ -4851,3 +4856,7 @@ bool SMDS_Mesh::isCompacted() } return true; } + +#if defined(__clang__) +# pragma clang diagnostic pop +#endif diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp index a742702ff0..4386473fcb 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp @@ -24,6 +24,11 @@ // Created : Mon Apr 12 16:10:22 2004 // Author : Edward AGAPOV (eap) +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor" +#endif + #include "SMESH_MeshEditor.hxx" #include "SMDS_FaceOfNodes.hxx" @@ -12868,3 +12873,7 @@ void SMESH_MeshEditor::copyPosition( const SMDS_MeshNode* from, default:; } } + +#if defined(__clang__) +# pragma clang diagnostic pop +#endif diff --git a/src/App/Expression.cpp b/src/App/Expression.cpp index bbbd2bd4a6..cfddd7e643 100644 --- a/src/App/Expression.cpp +++ b/src/App/Expression.cpp @@ -25,6 +25,11 @@ # include #endif +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor" +#endif + #include "Base/Exception.h" #include #include @@ -1988,3 +1993,7 @@ bool ExpressionParser::isTokenAUnit(const std::string & str) else return false; } + +#if defined(__clang__) +# pragma clang diagnostic pop +#endif diff --git a/src/Mod/Fem/App/CMakeLists.txt b/src/Mod/Fem/App/CMakeLists.txt index c84623cf42..e1dc025063 100644 --- a/src/Mod/Fem/App/CMakeLists.txt +++ b/src/Mod/Fem/App/CMakeLists.txt @@ -1,4 +1,9 @@ +# Many warnings caused by vtk +if(CMAKE_COMPILER_IS_CLANGXX) + set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override") +endif() + if(MSVC) add_definitions(-DFCAppFem -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH) else(MSVC) diff --git a/src/Mod/Fem/Gui/CMakeLists.txt b/src/Mod/Fem/Gui/CMakeLists.txt index 722b5b287c..9532cb54ad 100755 --- a/src/Mod/Fem/Gui/CMakeLists.txt +++ b/src/Mod/Fem/Gui/CMakeLists.txt @@ -1,3 +1,9 @@ + +# Many warnings caused by vtk +if(CMAKE_COMPILER_IS_CLANGXX) + set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override") +endif() + if(MSVC) add_definitions(-DFCGuiFem -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH) else(MSVC) diff --git a/src/Mod/Mesh/App/Core/Smoothing.cpp b/src/Mod/Mesh/App/Core/Smoothing.cpp index ac3c778134..55f6b58019 100644 --- a/src/Mod/Mesh/App/Core/Smoothing.cpp +++ b/src/Mod/Mesh/App/Core/Smoothing.cpp @@ -281,7 +281,6 @@ TaubinSmoothing::~TaubinSmoothing() void TaubinSmoothing::Smooth(unsigned int iterations) { - MeshCore::MeshPointArray::_TConstIterator v_it; MeshCore::MeshRefPointToPoints vv_it(kernel); MeshCore::MeshRefPointToFacets vf_it(kernel); @@ -295,7 +294,6 @@ void TaubinSmoothing::Smooth(unsigned int iterations) void TaubinSmoothing::SmoothPoints(unsigned int iterations, const std::vector& point_indices) { - MeshCore::MeshPointArray::_TConstIterator v_it; MeshCore::MeshRefPointToPoints vv_it(kernel); MeshCore::MeshRefPointToFacets vf_it(kernel); diff --git a/src/Mod/PartDesign/Gui/ViewProvider.h b/src/Mod/PartDesign/Gui/ViewProvider.h index 7e930b7ee6..bd01da596a 100644 --- a/src/Mod/PartDesign/Gui/ViewProvider.h +++ b/src/Mod/PartDesign/Gui/ViewProvider.h @@ -40,7 +40,7 @@ class TaskDlgFeatureParameters; class PartDesignGuiExport ViewProvider : public PartGui::ViewProviderPart, PartGui::ViewProviderAttachExtension { typedef PartGui::ViewProviderPart inherited; - PROPERTY_HEADER_WITH_EXTENSIONS(PartDesignGui::ViewProvider); + PROPERTY_HEADER_WITH_OVERRIDE(PartDesignGui::ViewProvider); public: /// constructor @@ -48,9 +48,9 @@ public: /// destructor virtual ~ViewProvider(); - virtual bool doubleClicked(void); - void updateData(const App::Property*); - void onChanged(const App::Property* prop); + virtual bool doubleClicked(void) override; + void updateData(const App::Property*) override; + void onChanged(const App::Property* prop) override; void setTipIcon(bool onoff); @@ -68,14 +68,14 @@ public: //Returns the ViewProvider of the body the feature belongs to, or NULL, if not in a body ViewProviderBody* getBodyViewProvider(); - virtual PyObject* getPyObject(void); + virtual PyObject* getPyObject(void) override; protected: - virtual void setupContextMenu(QMenu* menu, QObject* receiver, const char* member); - virtual bool setEdit(int ModNum); - virtual void unsetEdit(int ModNum); + virtual void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override; + virtual bool setEdit(int ModNum) override; + virtual void unsetEdit(int ModNum) override; - virtual bool onDelete(const std::vector &); + virtual bool onDelete(const std::vector &) override; virtual QIcon mergeOverlayIcons (const QIcon & orig) const override; diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 5649e05bcc..543d31c671 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -2970,7 +2970,7 @@ std::list Area::sortWires(const std::list &shapes, FC_TIME_LOG(t,"plane merging"); } - FC_DURATION_DECL_INIT(td); + //FC_DURATION_DECL_INIT(td); if(use_bound) { bounds.SetGap(0.0); diff --git a/src/Mod/Path/libarea/PythonStuff.cpp b/src/Mod/Path/libarea/PythonStuff.cpp index 475e60a28c..a1b3005e72 100644 --- a/src/Mod/Path/libarea/PythonStuff.cpp +++ b/src/Mod/Path/libarea/PythonStuff.cpp @@ -75,8 +75,10 @@ static void print_curve(const CCurve& c) std::size_t nvertices = c.m_vertices.size(); #if defined SIZEOF_SIZE_T && SIZEOF_SIZE_T == 4 printf("number of vertices = %d\n", nvertices); -#else +#elif defined(_WIN32) printf("number of vertices = %Iu\n", nvertices); +#else + printf("number of vertices = %lu\n", nvertices); #endif int i = 0; for(std::list::const_iterator It = c.m_vertices.begin(); It != c.m_vertices.end(); It++, i++) diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index 096f9d2ee7..ef6deab37e 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -118,8 +118,7 @@ using namespace std; PROPERTY_SOURCE(TechDraw::DrawViewPart, TechDraw::DrawView) DrawViewPart::DrawViewPart(void) : - geometryObject(0), - on1(true) + geometryObject(0) { static const char *group = "Projection"; static const char *sgroup = "HLR Parameters"; diff --git a/src/Mod/TechDraw/App/DrawViewPart.h b/src/Mod/TechDraw/App/DrawViewPart.h index fde103cf6e..37f572ee34 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.h +++ b/src/Mod/TechDraw/App/DrawViewPart.h @@ -218,7 +218,6 @@ protected: private: bool nowUnsetting; - bool on1; /* bool m_restoreComplete;*/ }; diff --git a/src/Mod/TechDraw/Gui/QGMText.cpp b/src/Mod/TechDraw/Gui/QGMText.cpp index f5e59e8467..57a3a19a47 100644 --- a/src/Mod/TechDraw/Gui/QGMText.cpp +++ b/src/Mod/TechDraw/Gui/QGMText.cpp @@ -49,7 +49,7 @@ QGMText::QGMText() : QVariant QGMText::itemChange(GraphicsItemChange change, const QVariant &value) { - QPointF newPos(0.0,0.0); + //QPointF newPos(0.0,0.0); if(change == ItemPositionHasChanged && scene()) { Q_EMIT dragging(); } diff --git a/src/Mod/TechDraw/Gui/QGTracker.cpp b/src/Mod/TechDraw/Gui/QGTracker.cpp index bd9eb7badf..244cc62ed0 100644 --- a/src/Mod/TechDraw/Gui/QGTracker.cpp +++ b/src/Mod/TechDraw/Gui/QGTracker.cpp @@ -52,11 +52,9 @@ using namespace TechDrawGui; QGTracker::QGTracker(QGraphicsScene* inScene, TrackerMode m): - m_width(0), m_sleep(false), m_qgParent(nullptr), - m_lastClick(QPointF(FLT_MAX,FLT_MAX)), - m_2clickPending(false) + m_lastClick(QPointF(FLT_MAX,FLT_MAX)) { setTrackerMode(m); if (inScene != nullptr) { diff --git a/src/Mod/TechDraw/Gui/QGTracker.h b/src/Mod/TechDraw/Gui/QGTracker.h index 9f65a48304..fff277782b 100644 --- a/src/Mod/TechDraw/Gui/QGTracker.h +++ b/src/Mod/TechDraw/Gui/QGTracker.h @@ -92,7 +92,6 @@ protected: double getTrackerWeight(); private: - double m_width; QGraphicsPathItem* m_track; QPointF m_segBegin; QPointF m_segEnd; @@ -103,7 +102,6 @@ private: QPen m_trackPen; QPen m_tailPen; QPointF m_lastClick; - bool m_2clickPending; }; } // namespace diff --git a/src/Mod/TechDraw/Gui/ViewProviderPage.h b/src/Mod/TechDraw/Gui/ViewProviderPage.h index bbfe423a2f..cb29a457e7 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderPage.h +++ b/src/Mod/TechDraw/Gui/ViewProviderPage.h @@ -98,7 +98,6 @@ private: QPointer m_mdiView; bool m_docReady; std::string m_pageName; - bool m_frameState; QGVPage* m_graphicsView; };