#18963 Minimize compiler warnings

This commit is contained in:
SALOME 2020-08-21 13:42:17 +03:00 committed by vsr
parent 0b0d503c15
commit ea5e046236
14 changed files with 33 additions and 38 deletions

View File

@ -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 );

View File

@ -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:

View File

@ -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;
}

View File

@ -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;

View File

@ -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();

View File

@ -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
{

View File

@ -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 )

View File

@ -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;
}

View File

@ -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");

View File

@ -43,7 +43,7 @@ public:
/*!
* Sets <number of segments> value
*/
void SetNumberOfSegments(int nb) throw (SALOME_Exception);
void SetNumberOfSegments(int nb);
/*!
* Returns <number of segments> value.
* Can be zero in case if LocalLength() has been set
@ -53,7 +53,7 @@ public:
/*!
* Sets <segment length> value
*/
void SetLocalLength(double segmentLength) throw (SALOME_Exception);
void SetLocalLength(double segmentLength);
/*!
* Returns <segment length> value.
* Can be zero in case if NumberOfSegments() has been set

View File

@ -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";

View File

@ -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

View File

@ -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

View File

@ -86,7 +86,6 @@ extern "C"
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_SimpleHypothesis_3D_i>;
else if (strcmp(aHypName, "NETGEN_RemesherParameters_2D") == 0)
aCreator = new NETGENPlugin_Creator_i<NETGENPlugin_RemesherHypothesis_2D_i>;
else ;
return aCreator;
}