From ea5e0462360659e435a5fb56e9bf0e21d526e713 Mon Sep 17 00:00:00 2001 From: SALOME Date: Fri, 21 Aug 2020 13:42:17 +0300 Subject: [PATCH] #18963 Minimize compiler warnings --- src/GUI/NETGENPluginGUI_HypothesisCreator.cxx | 2 +- src/GUI/NETGENPluginGUI_HypothesisCreator.h | 2 +- src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx | 4 ++-- src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx | 5 ++--- src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx | 3 +-- src/NETGENPlugin/NETGENPlugin_Mesher.cxx | 14 +++++++------- src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx | 2 +- src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx | 10 +++++----- .../NETGENPlugin_SimpleHypothesis_2D.cxx | 3 +-- .../NETGENPlugin_SimpleHypothesis_2D.hxx | 4 ++-- .../NETGENPlugin_SimpleHypothesis_2D_i.cxx | 3 +-- .../NETGENPlugin_SimpleHypothesis_2D_i.hxx | 10 +++++----- .../NETGENPlugin_SimpleHypothesis_3D_i.hxx | 8 ++++---- src/NETGENPlugin/NETGENPlugin_i.cxx | 1 - 14 files changed, 33 insertions(+), 38 deletions(-) diff --git a/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx b/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx index 2fa8a99..08f5962 100644 --- a/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/NETGENPluginGUI_HypothesisCreator.cxx @@ -116,7 +116,7 @@ NETGENPluginGUI_HypothesisCreator::~NETGENPluginGUI_HypothesisCreator() { } -bool NETGENPluginGUI_HypothesisCreator::checkParams(QString& msg) const +bool NETGENPluginGUI_HypothesisCreator::checkParams(QString& /*msg*/) const { NetgenHypothesisData data_old, data_new; readParamsFromHypo( data_old ); diff --git a/src/GUI/NETGENPluginGUI_HypothesisCreator.h b/src/GUI/NETGENPluginGUI_HypothesisCreator.h index 4846172..f5f7ded 100644 --- a/src/GUI/NETGENPluginGUI_HypothesisCreator.h +++ b/src/GUI/NETGENPluginGUI_HypothesisCreator.h @@ -63,7 +63,7 @@ public: NETGENPluginGUI_HypothesisCreator( const QString& ); virtual ~NETGENPluginGUI_HypothesisCreator(); - virtual bool checkParams(QString& msg) const; + virtual bool checkParams(QString&) const; virtual QString helpPage() const; protected: diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx index 2eabac4..8c58e3b 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis.cxx @@ -642,8 +642,8 @@ istream & NETGENPlugin_Hypothesis::LoadFrom(istream & load) * \retval bool - always false */ //================================================================================ -bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh, - const TopoDS_Shape& theShape) +bool NETGENPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, + const TopoDS_Shape& /*theShape*/) { return false; } diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx index e10cf8b..fa4b04c 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.cxx @@ -337,7 +337,6 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetChordalError() void NETGENPlugin_Hypothesis_i::SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize) - throw (SALOME::SALOME_Exception) { string entry; entry = GeomObj->GetStudyEntry(); @@ -712,7 +711,7 @@ std::string NETGENPlugin_Hypothesis_i::getMethodOfParameter(const int paramIndex bool NETGENPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) const + std::vector< int > & /*subIDArray*/ ) const { typedef ::NETGENPlugin_Hypothesis THyp; @@ -734,7 +733,7 @@ NETGENPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entr bool NETGENPlugin_Hypothesis_i::setObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) + std::vector< int > & /*subIDArray*/ ) { typedef ::NETGENPlugin_Hypothesis THyp; diff --git a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx index d1f54b6..e38b809 100644 --- a/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_Hypothesis_i.hxx @@ -83,8 +83,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Hypothesis_i: void SetChordalError(CORBA::Double value); CORBA::Double GetChordalError(); - void SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize) - throw (SALOME::SALOME_Exception); + void SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double localSize); void SetLocalSizeOnEntry(const char* entry, CORBA::Double localSize); CORBA::Double GetLocalSizeOnEntry(const char* entry); NETGENPlugin::string_array* GetLocalSizeEntries(); diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 8caf0bf..03df424 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -205,7 +205,7 @@ namespace list< TopoDS_Edge > getConnectedEdges( const TopoDS_Edge& edge, const TopoDS_Face& face, - const set< SMESH_subMesh* > & computedSM, + const set< SMESH_subMesh* > & /*computedSM*/, const SMESH_MesherHelper& helper, map< SMESH_subMesh*, set< int > >& addedEdgeSM2Faces) { @@ -319,7 +319,7 @@ namespace OCC_CATCH_SIGNALS; BRepMesh_IncrementalMesh e(shape, 0.01, true); } - catch (Standard_Failure) + catch (Standard_Failure&) { } // updated.erase( triangulation.operator->() ); @@ -3163,7 +3163,7 @@ bool NETGENPlugin_Mesher::Compute() comment << text(ex); //err = 1; -- try to make volumes anyway } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { comment << text(exc); //err = 1; -- try to make volumes anyway @@ -3289,7 +3289,7 @@ bool NETGENPlugin_Mesher::Compute() comment << text(ex); err = 1; } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { if ( comment.empty() ) // do not overwrite a previous error comment << text(exc); @@ -3320,7 +3320,7 @@ bool NETGENPlugin_Mesher::Compute() if ( comment.empty() ) // do not overwrite a previous error comment << text(ex); } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { if ( comment.empty() ) // do not overwrite a previous error comment << text(exc); @@ -3361,7 +3361,7 @@ bool NETGENPlugin_Mesher::Compute() if ( comment.empty() ) // do not overwrite a previous error comment << "Exception in netgen at passing to 2nd order "; } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { if ( comment.empty() ) // do not overwrite a previous error comment << exc.What(); @@ -3712,7 +3712,7 @@ bool NETGENPlugin_Mesher::Evaluate(MapShapeNbElems& aResMap) return true; } -double NETGENPlugin_Mesher::GetProgress(const SMESH_Algo* holder, +double NETGENPlugin_Mesher::GetProgress(const SMESH_Algo* /*holder*/, const int * algoProgressTic, const double * algoProgress) const { diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx index 76eef6f..a3425b5 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_3D.cxx @@ -519,7 +519,7 @@ bool NETGENPlugin_NETGEN_3D::compute(SMESH_Mesh& aMesh, str << ": " << ex.GetMessageString(); error(str); } - catch (netgen::NgException exc) + catch (netgen::NgException& exc) { SMESH_Comment str("NgException"); if ( strlen( netgen::multithread.task ) > 0 ) diff --git a/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx b/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx index c51e06f..6c662b3 100644 --- a/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx @@ -852,8 +852,8 @@ bool NETGENPlugin_Remesher_2D::Compute(SMESH_Mesh& theMesh, */ //============================================================================= -bool NETGENPlugin_Remesher_2D::Compute(SMESH_Mesh& theMesh, - const TopoDS_Shape& theShape) +bool NETGENPlugin_Remesher_2D::Compute(SMESH_Mesh& /*theMesh*/, + const TopoDS_Shape& /*theShape*/) { return false; } @@ -887,9 +887,9 @@ double NETGENPlugin_Remesher_2D::GetProgress() const */ //============================================================================= -bool NETGENPlugin_Remesher_2D::Evaluate(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - MapShapeNbElems& aResMap) +bool NETGENPlugin_Remesher_2D::Evaluate(SMESH_Mesh& /*aMesh*/, + const TopoDS_Shape& /*aShape*/, + MapShapeNbElems& /*aResMap*/) { return false; } diff --git a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.cxx b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.cxx index c7b192c..a457183 100644 --- a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.cxx @@ -59,7 +59,7 @@ NETGENPlugin_SimpleHypothesis_2D::NETGENPlugin_SimpleHypothesis_2D (int * */ //============================================================================= -void NETGENPlugin_SimpleHypothesis_2D::SetNumberOfSegments(int nb) throw (SALOME_Exception) +void NETGENPlugin_SimpleHypothesis_2D::SetNumberOfSegments(int nb) { if ( nb < 1 ) throw SALOME_Exception("Number of segments must be positive"); @@ -77,7 +77,6 @@ void NETGENPlugin_SimpleHypothesis_2D::SetNumberOfSegments(int nb) throw (SALOME */ //============================================================================= void NETGENPlugin_SimpleHypothesis_2D::SetLocalLength(double segmentLength) - throw (SALOME_Exception) { if ( segmentLength < DBL_MIN ) throw SALOME_Exception("segment length must be more than zero"); diff --git a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.hxx b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.hxx index 3ad1744..c5f075d 100644 --- a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.hxx +++ b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D.hxx @@ -43,7 +43,7 @@ public: /*! * Sets value */ - void SetNumberOfSegments(int nb) throw (SALOME_Exception); + void SetNumberOfSegments(int nb); /*! * Returns value. * Can be zero in case if LocalLength() has been set @@ -53,7 +53,7 @@ public: /*! * Sets value */ - void SetLocalLength(double segmentLength) throw (SALOME_Exception); + void SetLocalLength(double segmentLength); /*! * Returns value. * Can be zero in case if NumberOfSegments() has been set diff --git a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.cxx b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.cxx index 68b087b..dbd3b98 100644 --- a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.cxx @@ -72,7 +72,6 @@ NETGENPlugin_SimpleHypothesis_2D_i::~NETGENPlugin_SimpleHypothesis_2D_i() */ //============================================================================= void NETGENPlugin_SimpleHypothesis_2D_i::SetNumberOfSegments(CORBA::Short nb) - throw ( SALOME::SALOME_Exception ) { ASSERT(myBaseImpl); try { @@ -237,7 +236,7 @@ int NETGENPlugin_SimpleHypothesis_2D_i::getParamIndex(const TCollection_AsciiStr //================================================================================ std::string NETGENPlugin_SimpleHypothesis_2D_i::getMethodOfParameter(const int paramIndex, - int nbVars) const + int /*nbVars*/) const { switch ( paramIndex ) { case 0: return GetImpl()->GetNumberOfSegments() ? "SetNumberOfSegments" : "SetLocalLength"; diff --git a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx index 24e9ef9..d084768 100644 --- a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_2D_i.hxx @@ -49,7 +49,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_SimpleHypothesis_2D_i: // Destructor virtual ~NETGENPlugin_SimpleHypothesis_2D_i(); - void SetNumberOfSegments(CORBA::Short nb) throw ( SALOME::SALOME_Exception ); + void SetNumberOfSegments(CORBA::Short nb); CORBA::Short GetNumberOfSegments(); void SetLocalLength(CORBA::Double segmentLength); @@ -85,12 +85,12 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_SimpleHypothesis_2D_i: // Methods for copying mesh definition to other geometry // Return geometry this hypothesis depends on. Return false if there is no geometry parameter - virtual bool getObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) const { return 0; } + virtual bool getObjectsDependOn( std::vector< std::string > & /*entryArray*/, + std::vector< int > & /*subIDArray*/ ) const { return 0; } // Set new geometry instead of that returned by getObjectsDependOn() - virtual bool setObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) { return true; } + virtual bool setObjectsDependOn( std::vector< std::string > & /*entryArray*/, + std::vector< int > & /*subIDArray*/ ) { return true; } }; #endif diff --git a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_3D_i.hxx b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_3D_i.hxx index e6f8496..4994e54 100644 --- a/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_3D_i.hxx +++ b/src/NETGENPlugin/NETGENPlugin_SimpleHypothesis_3D_i.hxx @@ -63,12 +63,12 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_SimpleHypothesis_3D_i: // Methods for copying mesh definition to other geometry // Return geometry this hypothesis depends on. Return false if there is no geometry parameter - virtual bool getObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) const { return 0; } + virtual bool getObjectsDependOn( std::vector< std::string > & /*entryArray*/, + std::vector< int > & /*subIDArray*/ ) const { return 0; } // Set new geometry instead of that returned by getObjectsDependOn() - virtual bool setObjectsDependOn( std::vector< std::string > & entryArray, - std::vector< int > & subIDArray ) { return true; } + virtual bool setObjectsDependOn( std::vector< std::string > & /*entryArray*/, + std::vector< int > & /*subIDArray*/ ) { return true; } }; #endif diff --git a/src/NETGENPlugin/NETGENPlugin_i.cxx b/src/NETGENPlugin/NETGENPlugin_i.cxx index 11c68c8..5598608 100644 --- a/src/NETGENPlugin/NETGENPlugin_i.cxx +++ b/src/NETGENPlugin/NETGENPlugin_i.cxx @@ -86,7 +86,6 @@ extern "C" aCreator = new NETGENPlugin_Creator_i; else if (strcmp(aHypName, "NETGEN_RemesherParameters_2D") == 0) aCreator = new NETGENPlugin_Creator_i; - else ; return aCreator; } -- 2.30.2