Fix a couple of clang compiler warnings:
-Wunused-variable -Winconsistent-missing-override -Wdelete-non-virtual-dtor -Wunused-private-field -Wformat
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor"
|
||||
#endif
|
||||
|
||||
#include "Base/Exception.h"
|
||||
#include <Base/Interpreter.h>
|
||||
#include <App/Application.h>
|
||||
@@ -1988,3 +1993,7 @@ bool ExpressionParser::isTokenAUnit(const std::string & str)
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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<unsigned long>& point_indices)
|
||||
{
|
||||
MeshCore::MeshPointArray::_TConstIterator v_it;
|
||||
MeshCore::MeshRefPointToPoints vv_it(kernel);
|
||||
MeshCore::MeshRefPointToFacets vf_it(kernel);
|
||||
|
||||
|
||||
@@ -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<std::string> &);
|
||||
virtual bool onDelete(const std::vector<std::string> &) override;
|
||||
|
||||
virtual QIcon mergeOverlayIcons (const QIcon & orig) const override;
|
||||
|
||||
|
||||
@@ -2970,7 +2970,7 @@ std::list<TopoDS_Shape> Area::sortWires(const std::list<TopoDS_Shape> &shapes,
|
||||
FC_TIME_LOG(t,"plane merging");
|
||||
}
|
||||
|
||||
FC_DURATION_DECL_INIT(td);
|
||||
//FC_DURATION_DECL_INIT(td);
|
||||
|
||||
if(use_bound) {
|
||||
bounds.SetGap(0.0);
|
||||
|
||||
@@ -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<CVertex>::const_iterator It = c.m_vertices.begin(); It != c.m_vertices.end(); It++, i++)
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -218,7 +218,6 @@ protected:
|
||||
|
||||
private:
|
||||
bool nowUnsetting;
|
||||
bool on1;
|
||||
/* bool m_restoreComplete;*/
|
||||
|
||||
};
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -98,7 +98,6 @@ private:
|
||||
QPointer<MDIViewPage> m_mdiView;
|
||||
bool m_docReady;
|
||||
std::string m_pageName;
|
||||
bool m_frameState;
|
||||
QGVPage* m_graphicsView;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user