fight warnings, c++17. additional corrections++

This commit is contained in:
vsr 2020-10-14 14:21:35 +03:00
parent 9b08e00e6a
commit 242fecaab1
88 changed files with 253 additions and 197 deletions

View File

@ -123,15 +123,15 @@ std::string Driver_Mesh::fixUTF8(const std::string & str )
// how many bytes follow? // how many bytes follow?
int len = 0; int len = 0;
if (s[i] >> 5 == 0b110 ) len = 1; if (s[i] >> 5 == 0b110 ) len = 1; // todo: binary constants are a GCC extension
else if (s[i] >> 4 == 0b1110 ) len = 2; else if (s[i] >> 4 == 0b1110 ) len = 2; // todo: binary constants are a GCC extension
else if (s[i] >> 3 == 0b11110) len = 3; else if (s[i] >> 3 == 0b11110) len = 3; // todo: binary constants are a GCC extension
else else
invalid = true; invalid = true;
// check the bytes // check the bytes
for ( int j = 0; j < len && !invalid; ++j ) for ( int j = 0; j < len && !invalid; ++j )
invalid = ( s[i+j+1] >> 6 != 0b10 ); invalid = ( s[i+j+1] >> 6 != 0b10 ); // todo: binary constants are a GCC extension
if ( invalid ) if ( invalid )
fixed[i] = '?'; fixed[i] = '?';

View File

@ -134,12 +134,12 @@ namespace
ids[2] = ids[0] + _sizeX + 1; ids[2] = ids[0] + _sizeX + 1;
ids[3] = ids[0] + ( k==_sizeZ ? _sizeX : 1); ids[3] = ids[0] + ( k==_sizeZ ? _sizeX : 1);
} }
void IEdgeNodes( int i, int j, int k, cgsize_t* ids ) const // edge perpendiculaire to X (2D) void IEdgeNodes( int i, int j, int /*k*/, cgsize_t* ids ) const // edge perpendiculaire to X (2D)
{ {
ids[0] = NodeID( i, j, 0 ); ids[0] = NodeID( i, j, 0 );
ids[1] = ids[0] + _sizeX; ids[1] = ids[0] + _sizeX;
} }
void JEdgeNodes( int i, int j, int k, cgsize_t* ids ) const void JEdgeNodes( int i, int j, int /*k*/, cgsize_t* ids ) const
{ {
ids[0] = NodeID( i, j, 0 ); ids[0] = NodeID( i, j, 0 );
ids[1] = ids[0] + 1; ids[1] = ids[0] + 1;
@ -187,7 +187,7 @@ namespace
} }
gp_XYZ Next() gp_XYZ Next()
{ {
gp_XYZ res( _cur[0], _cur[1], _cur[2] ); gp_XYZ res( _cur[0], _cur[1], _cur[2] ); // todo: _cur can be used uninitialized
for ( int i = 0; i < _dim; ++i ) for ( int i = 0; i < _dim; ++i )
{ {
_cur[i] += _dir[i]; _cur[i] += _dir[i];
@ -207,7 +207,7 @@ namespace
size *= _dir[i]*(_end[i]-_beg[i]); size *= _dir[i]*(_end[i]-_beg[i]);
return size; return size;
} }
gp_XYZ Begin() const { return gp_XYZ( _beg[0], _beg[1], _beg[2] ); } gp_XYZ Begin() const { return gp_XYZ( _beg[0], _beg[1], _beg[2] ); } // todo: _beg can be used uninitialized
//gp_XYZ End() const { return gp_XYZ( _end[0]-1, _end[1]-1, _end[2]-1 ); } //gp_XYZ End() const { return gp_XYZ( _end[0]-1, _end[1]-1, _end[2]-1 ); }
}; };
@ -297,7 +297,7 @@ namespace
} }
// fill nodeReplacementMap // fill nodeReplacementMap
TPointRangeIterator rangeIt1( range, _meshDim ); TPointRangeIterator rangeIt1( range, _meshDim ); // todo: rangeIt1: _end[i], _dir[i], _beg[i], _cur[i] may be used uninitialized
TPointRangeIterator rangeIt2( donorRange, _meshDim ); TPointRangeIterator rangeIt2( donorRange, _meshDim );
gp_XYZ begin1 = rangeIt1.Begin(), begin2 = rangeIt2.Begin(), index1, index2; gp_XYZ begin1 = rangeIt1.Begin(), begin2 = rangeIt2.Begin(), index1, index2;
if ( &zone2 == this ) if ( &zone2 == this )
@ -1073,14 +1073,14 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
PGetNodesFun getNodesFun = 0; PGetNodesFun getNodesFun = 0;
if ( elemType == SMDSAbs_Face && meshDim == 3 ) if ( elemType == SMDSAbs_Face && meshDim == 3 )
switch ( axis ) { switch ( axis ) {
case 0: getNodesFun = & TZoneData::IFaceNodes; case 0: getNodesFun = & TZoneData::IFaceNodes; break;
case 1: getNodesFun = & TZoneData::JFaceNodes; case 1: getNodesFun = & TZoneData::JFaceNodes; break;
case 2: getNodesFun = & TZoneData::KFaceNodes; case 2: getNodesFun = & TZoneData::KFaceNodes; break;
} }
else if ( elemType == SMDSAbs_Edge && meshDim == 2 ) else if ( elemType == SMDSAbs_Edge && meshDim == 2 )
switch ( axis ) { switch ( axis ) {
case 0: getNodesFun = & TZoneData::IEdgeNodes; case 0: getNodesFun = & TZoneData::IEdgeNodes; break;
case 1: getNodesFun = & TZoneData::JEdgeNodes; case 1: getNodesFun = & TZoneData::JEdgeNodes; break;
} }
if ( !getNodesFun ) if ( !getNodesFun )
{ {
@ -1103,14 +1103,14 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
PGetNodesFun getNodesFun = 0; PGetNodesFun getNodesFun = 0;
if ( elemType == SMDSAbs_Face ) if ( elemType == SMDSAbs_Face )
switch ( axis ) { switch ( axis ) {
case 0: getNodesFun = & TZoneData::IFaceNodes; case 0: getNodesFun = & TZoneData::IFaceNodes; break;
case 1: getNodesFun = & TZoneData::JFaceNodes; case 1: getNodesFun = & TZoneData::JFaceNodes; break;
case 2: getNodesFun = & TZoneData::KFaceNodes; case 2: getNodesFun = & TZoneData::KFaceNodes; break;
} }
else if ( elemType == SMDSAbs_Edge && meshDim == 2 ) else if ( elemType == SMDSAbs_Edge && meshDim == 2 )
switch ( axis ) { switch ( axis ) {
case 0: getNodesFun = & TZoneData::IEdgeNodes; case 0: getNodesFun = & TZoneData::IEdgeNodes; break;
case 1: getNodesFun = & TZoneData::JEdgeNodes; case 1: getNodesFun = & TZoneData::JEdgeNodes; break;
} }
if ( !getNodesFun ) if ( !getNodesFun )
{ {
@ -1129,9 +1129,9 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
PAddElemFun addElemFun = 0; PAddElemFun addElemFun = 0;
switch ( meshDim ) { switch ( meshDim ) {
case 1: addElemFun = & add_BAR_2; case 1: addElemFun = & add_BAR_2; break;
case 2: addElemFun = & add_QUAD_4; case 2: addElemFun = & add_QUAD_4; break;
case 3: addElemFun = & add_HEXA_8; case 3: addElemFun = & add_HEXA_8; break;
} }
int elemID = meshInfo.NbElements(); int elemID = meshInfo.NbElements();
const SMDS_MeshElement* elem = 0; const SMDS_MeshElement* elem = 0;

View File

@ -78,7 +78,7 @@ typedef struct
static int GmfIniFlg=0; static int GmfIniFlg=0;
static GmfMshSct *GmfMshTab[ MaxMsh + 1 ]; static GmfMshSct *GmfMshTab[ MaxMsh + 1 ];
// see MeshGems/Docs/meshgems_formats_description.pdf /* see MeshGems/Docs/meshgems_formats_description.pdf */
static const char *GmfKwdFmt[ GmfMaxKwd + 1 ][4] = static const char *GmfKwdFmt[ GmfMaxKwd + 1 ][4] =
{ {"Reserved", "", "", ""}, { {"Reserved", "", "", ""},
{"MeshVersionFormatted", "", "", "i"}, {"MeshVersionFormatted", "", "", "i"},
@ -875,7 +875,7 @@ void GmfSetLin(int MshIdx, int KwdCod, ...)
{ {
for(i=0;i<kwd->SolSiz;i++) for(i=0;i<kwd->SolSiz;i++)
if(kwd->fmt[i] == 'r') if(kwd->fmt[i] == 'r')
fprintf(msh->hdl, "%.15lg ", va_arg(VarArg, double)); fprintf(msh->hdl, "%.15lg ", va_arg(VarArg, double)); /* todo: ISO C90 does not support the '%lg' gnu_printf format */
else if(kwd->fmt[i] == 'n') { else if(kwd->fmt[i] == 'n') {
nb_repeat = va_arg(VarArg, int); nb_repeat = va_arg(VarArg, int);
fprintf(msh->hdl, "%d ", nb_repeat); fprintf(msh->hdl, "%d ", nb_repeat);
@ -936,7 +936,7 @@ void GmfSetLin(int MshIdx, int KwdCod, ...)
if(msh->typ & Asc) if(msh->typ & Asc)
for(j=0;j<kwd->SolSiz;j++) for(j=0;j<kwd->SolSiz;j++)
fprintf(msh->hdl, "%.15lg ", DblSolTab[j]); fprintf(msh->hdl, "%.15lg ", DblSolTab[j]); /* todo: ISO C90 does not support the '%lg' gnu_printf format */
else else
RecBlk(msh, (unsigned char *)DblSolTab, kwd->NmbWrd); RecBlk(msh, (unsigned char *)DblSolTab, kwd->NmbWrd);
} }
@ -1064,7 +1064,7 @@ static int ScaKwdTab(GmfMshSct *msh)
{ {
/* Search which kwd code this string is associated with, /* Search which kwd code this string is associated with,
then get its header and save the current position in file (just before the data) */ then get its header and save the current position in file (just before the data) */
// printf("libmesh ScaKwdTab %s\n", str); /* printf("libmesh ScaKwdTab %s\n", str); */
for(KwdCod=1; KwdCod<= GmfMaxKwd; KwdCod++) for(KwdCod=1; KwdCod<= GmfMaxKwd; KwdCod++)
if(!strcmp(str, GmfKwdFmt[ KwdCod ][0])) if(!strcmp(str, GmfKwdFmt[ KwdCod ][0]))
{ {
@ -1191,7 +1191,7 @@ static void ExpFmt(GmfMshSct *msh, int KwdCod)
i = kwd->SolSiz = kwd->NmbWrd = 0; i = kwd->SolSiz = kwd->NmbWrd = 0;
while(i < strlen(InpFmt)) while(i < (int)strlen(InpFmt))
{ {
chr = InpFmt[ i++ ]; chr = InpFmt[ i++ ];

View File

@ -18,7 +18,15 @@
/* Defines */ /* Defines */
/*----------------------------------------------------------*/ /*----------------------------------------------------------*/
#include "SMESH_DriverGMF.hxx" #ifdef WIN32
#if defined MESHDriverGMF_EXPORTS || defined MeshDriverGMF_EXPORTS
#define MESHDriverGMF_EXPORT __declspec( dllexport )
#else
#define MESHDriverGMF_EXPORT __declspec( dllimport )
#endif
#else
#define MESHDriverGMF_EXPORT
#endif
#define GmfStrSiz 1024 #define GmfStrSiz 1024
#define GmfMaxTyp 1000 #define GmfMaxTyp 1000
@ -33,7 +41,7 @@
#define GmfFloat 1 #define GmfFloat 1
#define GmfDouble 2 #define GmfDouble 2
// see MeshGems/Docs/meshgems_formats_description.pdf /* see MeshGems/Docs/meshgems_formats_description.pdf */
enum GmfKwdCod enum GmfKwdCod
{ {
GmfReserved1, \ GmfReserved1, \

View File

@ -156,7 +156,7 @@ bool DriverMED_W_Field::Set(SMESHDS_Mesh * mesh,
else else
_dblValues.reserve( nbElems * nbComps ); _dblValues.reserve( nbElems * nbComps );
return nbElems * nbComps; return nbElems && nbComps;
} }
//================================================================================ //================================================================================

View File

@ -379,7 +379,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
if ( myAutoDimension && aMeshDimension < 3 ) if ( myAutoDimension && aMeshDimension < 3 )
{ {
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator(); SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator();
double aBounds[6]; double aBounds[6] = {0.,0.,0.,0.,0.,0.};
if(aNodesIter->more()){ if(aNodesIter->more()){
const SMDS_MeshNode* aNode = aNodesIter->next(); const SMDS_MeshNode* aNode = aNodesIter->next();
aBounds[0] = aBounds[1] = aNode->X(); aBounds[0] = aBounds[1] = aNode->X();

View File

@ -28,8 +28,8 @@
static int MYDEBUG = 0; static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0; static int MYVALUEDEBUG = 0;
#else #else
static int MYDEBUG = 0; static int MYDEBUG = 0; // todo: unused in release mode
static int MYVALUEDEBUG = 0; static int MYVALUEDEBUG = 0; // todo: unused in release mode
#endif #endif
namespace MED namespace MED

View File

@ -27,8 +27,8 @@
static int MYDEBUG = 0; static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0; static int MYVALUEDEBUG = 0;
#else #else
static int MYDEBUG = 0; static int MYDEBUG = 0; // todo: unused in release mode
static int MYVALUEDEBUG = 0; static int MYVALUEDEBUG = 0; // todo: unused in release mode
#endif #endif
namespace MED namespace MED

View File

@ -352,10 +352,10 @@ namespace MED
TGaussInfo::TLess TGaussInfo::TLess
::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const ::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const
{ {
if(!&theLeft) if(!&theLeft) // todo: address of reference can be assumed always non-null by compiler
return true; return true;
if(!&theRight) if(!&theRight) // todo: address of reference can be assumed always non-null by compiler
return false; return false;
if(theLeft.myGeom != theRight.myGeom) if(theLeft.myGeom != theRight.myGeom)
@ -644,13 +644,14 @@ namespace MED
switch(aDim){ switch(aDim){
case 3: case 3:
aCoord[2] = myCoord[aDim*theId+2]; aCoord[2] = myCoord[aDim*theId+2];
// fall through
case 2: case 2:
aCoord[1] = myCoord[aDim*theId+1]; aCoord[1] = myCoord[aDim*theId+1];
case 1:{ // fall through
case 1:
aCoord[0] = myCoord[aDim*theId]; aCoord[0] = myCoord[aDim*theId];
break; break;
} }
}
} else { } else {
TFloatVector aVecX = this->GetIndexes(0); TFloatVector aVecX = this->GetIndexes(0);

View File

@ -26,7 +26,7 @@
#ifdef _DEBUG_ #ifdef _DEBUG_
static int MYDEBUG = 0; static int MYDEBUG = 0;
#else #else
static int MYDEBUG = 0; static int MYDEBUG = 0; // todo: unused in release mode
#endif #endif
int MED::PrefixPrinter::myCounter = 0; int MED::PrefixPrinter::myCounter = 0;
@ -39,7 +39,7 @@ MED::PrefixPrinter::PrefixPrinter(bool theIsActive):
MSG(MYDEBUG,"MED::PrefixPrinter::PrefixPrinter(...)- "<<myCounter); MSG(MYDEBUG,"MED::PrefixPrinter::PrefixPrinter(...)- "<<myCounter);
} }
MED::PrefixPrinter::~PrefixPrinter() MED::PrefixPrinter::~PrefixPrinter() noexcept(false)
{ {
if(myIsActive){ if(myIsActive){
myCounter--; myCounter--;

View File

@ -39,7 +39,7 @@ namespace MED
bool myIsActive; bool myIsActive;
public: public:
PrefixPrinter(bool theIsActive = true); PrefixPrinter(bool theIsActive = true);
~PrefixPrinter(); ~PrefixPrinter() noexcept(false);
static std::string GetPrefix(); static std::string GetPrefix();
}; };

View File

@ -38,8 +38,8 @@
static int MYDEBUG = 0; static int MYDEBUG = 0;
static int MYVALUEDEBUG = 0; static int MYVALUEDEBUG = 0;
#else #else
static int MYDEBUG = 0; static int MYDEBUG = 0; // todo: unused in release mode
static int MYVALUEDEBUG = 0; static int MYVALUEDEBUG = 0; // todo: unused in release mode
#endif #endif
namespace MED namespace MED

View File

@ -43,6 +43,6 @@ int main (int argc, char **argv)
minor = release = -1; minor = release = -1;
} }
printf("%d.%d.%d\n", major, minor, release); printf("%d.%d.%d\n", (int)major, (int)minor, (int)release);
return 0; return 0;
} }

View File

@ -1914,7 +1914,7 @@ int SMESH_ActorDef::RenderTranslucentGeometry(vtkViewport *vp)
} }
void SMESH_ActorDef::Render(vtkRenderer *ren) void SMESH_ActorDef::Render(vtkRenderer* /*ren*/)
{ {
vtkMTimeType aTime = myTimeStamp->GetMTime(); vtkMTimeType aTime = myTimeStamp->GetMTime();
vtkMTimeType anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime(); vtkMTimeType anObjTime = myVisualObj->GetUnstructuredGrid()->GetMTime();

View File

@ -205,7 +205,7 @@ void SMESH_CellLabelActor::UpdateLabels()
void SMESH_CellLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject), void SMESH_CellLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
unsigned long theEvent, unsigned long /*theEvent*/,
void* theClientData, void* theClientData,
void* vtkNotUsed(theCallData)) void* vtkNotUsed(theCallData))
{ {

View File

@ -410,7 +410,7 @@ SMESH_DeviceActor
aNbCells = 0; aNbCells = 0;
for(; anIter != aValues.end(); anIter++){ for(; anIter != aValues.end(); anIter++){
const Length2D::Value& aValue = *anIter; const Length2D::Value& aValue = *anIter;
int aNode[2] = { vtkIdType aNode[2] = {
myVisualObj->GetNodeVTKId(aValue.myPntId[0]), myVisualObj->GetNodeVTKId(aValue.myPntId[0]),
myVisualObj->GetNodeVTKId(aValue.myPntId[1]) myVisualObj->GetNodeVTKId(aValue.myPntId[1])
}; };
@ -475,7 +475,7 @@ SMESH_DeviceActor
aNbCells = 0; aNbCells = 0;
for(; anIter != aValues.end(); anIter++){ for(; anIter != aValues.end(); anIter++){
const MultiConnection2D::Value& aValue = (*anIter).first; const MultiConnection2D::Value& aValue = (*anIter).first;
int aNode[2] = { vtkIdType aNode[2] = {
myVisualObj->GetNodeVTKId(aValue.myPntId[0]), myVisualObj->GetNodeVTKId(aValue.myPntId[0]),
myVisualObj->GetNodeVTKId(aValue.myPntId[1]) myVisualObj->GetNodeVTKId(aValue.myPntId[1])
}; };
@ -573,7 +573,7 @@ SMESH_DeviceActor
FreeEdges::TBorders::const_iterator anIter = aBorders.begin(); FreeEdges::TBorders::const_iterator anIter = aBorders.begin();
for(; anIter != aBorders.end(); anIter++){ for(; anIter != aBorders.end(); anIter++){
const FreeEdges::Border& aBorder = *anIter; const FreeEdges::Border& aBorder = *anIter;
int aNode[2] = { vtkIdType aNode[2] = {
myVisualObj->GetNodeVTKId(aBorder.myPntId[0]), myVisualObj->GetNodeVTKId(aBorder.myPntId[0]),
myVisualObj->GetNodeVTKId(aBorder.myPntId[1]) myVisualObj->GetNodeVTKId(aBorder.myPntId[1])
}; };

View File

@ -195,7 +195,7 @@ void SMESH_NodeLabelActor::UpdateLabels()
void SMESH_NodeLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject), void SMESH_NodeLabelActor::ProcessEvents(vtkObject* vtkNotUsed(theObject),
unsigned long theEvent, unsigned long /*theEvent*/,
void* theClientData, void* theClientData,
void* vtkNotUsed(theCallData)) void* vtkNotUsed(theCallData))
{ {

View File

@ -43,9 +43,9 @@
vtkStandardNewMacro(SMESH_ScalarBarActor) vtkStandardNewMacro(SMESH_ScalarBarActor)
vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LookupTable,vtkScalarsToColors); vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LookupTable,vtkScalarsToColors)
vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LabelTextProperty,vtkTextProperty); vtkCxxSetObjectMacro(SMESH_ScalarBarActor,LabelTextProperty,vtkTextProperty)
vtkCxxSetObjectMacro(SMESH_ScalarBarActor,TitleTextProperty,vtkTextProperty); vtkCxxSetObjectMacro(SMESH_ScalarBarActor,TitleTextProperty,vtkTextProperty)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label // Instantiate object with 64 maximum colors; 5 labels; %%-#6.3g label

View File

@ -231,7 +231,7 @@ struct _RangeSet
* \brief Return ranges of indices (from,to) of elements having a given value * \brief Return ranges of indices (from,to) of elements having a given value
*/ */
bool GetIndices( const attr_t theValue, TIndexRanges & theIndices, bool GetIndices( const attr_t theValue, TIndexRanges & theIndices,
const attr_t* theMinValue = 0, const attr_t* theMaxValue = 0) const const attr_t* /*theMinValue*/ = 0, const attr_t* /*theMaxValue*/ = 0) const
{ {
bool isFound = false; bool isFound = false;

View File

@ -33,7 +33,7 @@
#include <iostream> #include <iostream>
#endif #endif
int main (int argc, char ** argv) int main ()
{ {
// To better understand what is going on here, consult bug [SALOME platform 0019911] // To better understand what is going on here, consult bug [SALOME platform 0019911]
#if !defined WIN32 && !defined __APPLE__ #if !defined WIN32 && !defined __APPLE__

View File

@ -62,7 +62,7 @@ class SMDS_Ptr : public std::unique_ptr< T >
SMDS_Ptr( T * pos = (T *) 0, bool isOwner=true ): SMDS_Ptr( T * pos = (T *) 0, bool isOwner=true ):
std::unique_ptr< T >( pos ), myIsOwner( isOwner ) {} std::unique_ptr< T >( pos ), myIsOwner( isOwner ) {}
SMDS_Ptr( const SMDS_Ptr& from ) : myIsOwner( from.myIsOwner ) SMDS_Ptr( const SMDS_Ptr& from ) : std::unique_ptr< T >(), myIsOwner( from.myIsOwner )
{ this->swap( const_cast<SMDS_Ptr&>( from )); } { this->swap( const_cast<SMDS_Ptr&>( from )); }
SMDS_Ptr& operator=( const SMDS_Ptr& from ) SMDS_Ptr& operator=( const SMDS_Ptr& from )

View File

@ -482,6 +482,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool /*withEdges*/)
GuessSize[VTK_QUADRATIC_HEXAHEDRON] = nbQuadHexa; GuessSize[VTK_QUADRATIC_HEXAHEDRON] = nbQuadHexa;
GuessSize[VTK_TRIQUADRATIC_HEXAHEDRON] = nbQuadHexa; GuessSize[VTK_TRIQUADRATIC_HEXAHEDRON] = nbQuadHexa;
GuessSize[VTK_HEXAGONAL_PRISM] = nbHexPrism; GuessSize[VTK_HEXAGONAL_PRISM] = nbHexPrism;
(void)GuessSize; // unused in Release mode
_downArray[VTK_LINE] ->allocate(nbLineGuess); _downArray[VTK_LINE] ->allocate(nbLineGuess);
_downArray[VTK_QUADRATIC_EDGE] ->allocate(nbQuadEdgeGuess); _downArray[VTK_QUADRATIC_EDGE] ->allocate(nbQuadEdgeGuess);

View File

@ -1488,10 +1488,10 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
case QUAD_TETRA: case QUAD_TETRA:
{ {
switch ( minInd ) { switch ( minInd ) {
case 0: if( maxInd==4 || maxInd==6 || maxInd==7 ) return true; case 0: if( maxInd==4 || maxInd==6 || maxInd==7 ) return true; // fall through
case 1: if( maxInd==4 || maxInd==5 || maxInd==8 ) return true; case 1: if( maxInd==4 || maxInd==5 || maxInd==8 ) return true; // fall through
case 2: if( maxInd==5 || maxInd==6 || maxInd==9 ) return true; case 2: if( maxInd==5 || maxInd==6 || maxInd==9 ) return true; // fall through
case 3: if( maxInd==7 || maxInd==8 || maxInd==9 ) return true; case 3: if( maxInd==7 || maxInd==8 || maxInd==9 ) return true; // fall through
default:; default:;
} }
break; break;
@ -1499,14 +1499,14 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
case QUAD_HEXA: case QUAD_HEXA:
{ {
switch ( minInd ) { switch ( minInd ) {
case 0: if( maxInd==8 || maxInd==11 || maxInd==16 ) return true; case 0: if( maxInd==8 || maxInd==11 || maxInd==16 ) return true; // fall through
case 1: if( maxInd==8 || maxInd==9 || maxInd==17 ) return true; case 1: if( maxInd==8 || maxInd==9 || maxInd==17 ) return true; // fall through
case 2: if( maxInd==9 || maxInd==10 || maxInd==18 ) return true; case 2: if( maxInd==9 || maxInd==10 || maxInd==18 ) return true; // fall through
case 3: if( maxInd==10 || maxInd==11 || maxInd==19 ) return true; case 3: if( maxInd==10 || maxInd==11 || maxInd==19 ) return true; // fall through
case 4: if( maxInd==12 || maxInd==15 || maxInd==16 ) return true; case 4: if( maxInd==12 || maxInd==15 || maxInd==16 ) return true; // fall through
case 5: if( maxInd==12 || maxInd==13 || maxInd==17 ) return true; case 5: if( maxInd==12 || maxInd==13 || maxInd==17 ) return true; // fall through
case 6: if( maxInd==13 || maxInd==14 || maxInd==18 ) return true; case 6: if( maxInd==13 || maxInd==14 || maxInd==18 ) return true; // fall through
case 7: if( maxInd==14 || maxInd==15 || maxInd==19 ) return true; case 7: if( maxInd==14 || maxInd==15 || maxInd==19 ) return true; // fall through
default:; default:;
} }
break; break;
@ -1514,10 +1514,10 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
case QUAD_PYRAM: case QUAD_PYRAM:
{ {
switch ( minInd ) { switch ( minInd ) {
case 0: if( maxInd==5 || maxInd==8 || maxInd==9 ) return true; case 0: if( maxInd==5 || maxInd==8 || maxInd==9 ) return true; // fall through
case 1: if( maxInd==5 || maxInd==6 || maxInd==10 ) return true; case 1: if( maxInd==5 || maxInd==6 || maxInd==10 ) return true; // fall through
case 2: if( maxInd==6 || maxInd==7 || maxInd==11 ) return true; case 2: if( maxInd==6 || maxInd==7 || maxInd==11 ) return true; // fall through
case 3: if( maxInd==7 || maxInd==8 || maxInd==12 ) return true; case 3: if( maxInd==7 || maxInd==8 || maxInd==12 ) return true; // fall through
case 4: if( maxInd==9 || maxInd==10 || maxInd==11 || maxInd==12 ) return true; case 4: if( maxInd==9 || maxInd==10 || maxInd==11 || maxInd==12 ) return true;
default:; default:;
} }
@ -1526,12 +1526,12 @@ bool SMDS_VolumeTool::IsLinked (const int theNode1Index,
case QUAD_PENTA: case QUAD_PENTA:
{ {
switch ( minInd ) { switch ( minInd ) {
case 0: if( maxInd==6 || maxInd==8 || maxInd==12 ) return true; case 0: if( maxInd==6 || maxInd==8 || maxInd==12 ) return true; // fall through
case 1: if( maxInd==6 || maxInd==7 || maxInd==13 ) return true; case 1: if( maxInd==6 || maxInd==7 || maxInd==13 ) return true; // fall through
case 2: if( maxInd==7 || maxInd==8 || maxInd==14 ) return true; case 2: if( maxInd==7 || maxInd==8 || maxInd==14 ) return true; // fall through
case 3: if( maxInd==9 || maxInd==11 || maxInd==12 ) return true; case 3: if( maxInd==9 || maxInd==11 || maxInd==12 ) return true; // fall through
case 4: if( maxInd==9 || maxInd==10 || maxInd==13 ) return true; case 4: if( maxInd==9 || maxInd==10 || maxInd==13 ) return true; // fall through
case 5: if( maxInd==10 || maxInd==11 || maxInd==14 ) return true; case 5: if( maxInd==10 || maxInd==11 || maxInd==14 ) return true; // fall through
default:; default:;
} }
break; break;

View File

@ -518,7 +518,7 @@ GeomAbs_Shape SMESH_Algo::Continuity(const TopoDS_Edge& theE1,
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol); return BRepLProp::Continuity(C1, C2, u1, u2, tol, angTol);
} }
catch (Standard_Failure) { catch (Standard_Failure&) {
} }
return GeomAbs_C0; return GeomAbs_C0;
} }

View File

@ -1015,10 +1015,10 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
} }
// get a separator from rootDir // get a separator from rootDir
for ( pos = strlen( rootDir )-1; pos >= 0 && sep.empty(); --pos ) for ( int i = strlen( rootDir )-1; i >= 0 && sep.empty(); --i )
if ( rootDir[pos] == '/' || rootDir[pos] == '\\' ) if ( rootDir[i] == '/' || rootDir[i] == '\\' )
{ {
sep = rootDir[pos]; sep = rootDir[i];
break; break;
} }
#ifdef WIN32 #ifdef WIN32

View File

@ -3843,9 +3843,9 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
} }
else { else {
if ( isUPeriodic ) if ( isUPeriodic )
newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 )); newUV.SetX( ElCLib::InPeriod( newUV.X(), u1, u2 )); // todo: u may be used unitialized
if ( isVPeriodic ) if ( isVPeriodic )
newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 )); newUV.SetY( ElCLib::InPeriod( newUV.Y(), v1, v2 )); // todo: v may be used unitialized
// check new UV // check new UV
// if ( posType != SMDS_TOP_3DSPACE ) // if ( posType != SMDS_TOP_3DSPACE )
// dist2 = pNode.SquareDistance( surface->Value( newUV.X(), newUV.Y() )); // dist2 = pNode.SquareDistance( surface->Value( newUV.X(), newUV.Y() ));
@ -6056,6 +6056,7 @@ SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet theElements[2],
if ( nbEdges > 0 ) if ( nbEdges > 0 )
break; break;
} }
// fall through
default: default:
{ {
for ( int di = -1; di <= 1; di += 2 ) for ( int di = -1; di <= 1; di += 2 )
@ -7446,6 +7447,7 @@ public:
//int& GroupID() const { return const_cast< int& >( myGroupID ); } //int& GroupID() const { return const_cast< int& >( myGroupID ); }
ComparableElement( const ComparableElement& theSource ) // move copy ComparableElement( const ComparableElement& theSource ) // move copy
: boost::container::flat_set< int >()
{ {
ComparableElement& src = const_cast< ComparableElement& >( theSource ); ComparableElement& src = const_cast< ComparableElement& >( theSource );
(int_set&) (*this ) = boost::move( src ); (int_set&) (*this ) = boost::move( src );
@ -10184,7 +10186,7 @@ namespace // automatically find theAffectedElems for DoubleNodes()
if ( SMESH_MeshAlgos::FaceNormal( _elems[1], norm )) if ( SMESH_MeshAlgos::FaceNormal( _elems[1], norm ))
avgNorm += norm; avgNorm += norm;
gp_XYZ bordDir( SMESH_NodeXYZ( _nodes[0] ) - SMESH_NodeXYZ( _nodes[1] )); gp_XYZ bordDir( SMESH_NodeXYZ( _nodes[0] ) - SMESH_NodeXYZ( _nodes[1] )); // todo: compiler complains about zero-size array
norm = bordDir ^ avgNorm; norm = bordDir ^ avgNorm;
} }
else else
@ -11031,7 +11033,7 @@ double SMESH_MeshEditor::OrientedAngle(const gp_Pnt& p0, const gp_Pnt& p1, const
try { try {
return n2.AngleWithRef(n1, vref); return n2.AngleWithRef(n1, vref);
} }
catch ( Standard_Failure ) { catch ( Standard_Failure& ) {
} }
return Max( v1.Magnitude(), v2.Magnitude() ); return Max( v1.Magnitude(), v2.Magnitude() );
} }

View File

@ -2421,7 +2421,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
const SMDS_MeshNode* n11, const SMDS_MeshNode* n11,
const SMDS_MeshNode* n12, const SMDS_MeshNode* n12,
const int id, const int id,
bool force3d) bool /*force3d*/)
{ {
SMESHDS_Mesh * meshDS = GetMeshDS(); SMESHDS_Mesh * meshDS = GetMeshDS();
SMDS_MeshVolume* elem = 0; SMDS_MeshVolume* elem = 0;
@ -3769,7 +3769,7 @@ namespace { // Structures used by FixQuadraticElements()
/*! /*!
* \brief Dump QLink and QFace * \brief Dump QLink and QFace
*/ */
ostream& operator << (ostream& out, const QLink& l) ostream& operator << (ostream& out, const QLink& l) // todo: unused in release mode
{ {
out <<"QLink nodes: " out <<"QLink nodes: "
<< l.node1()->GetID() << " - " << l.node1()->GetID() << " - "
@ -3777,7 +3777,7 @@ namespace { // Structures used by FixQuadraticElements()
<< l.node2()->GetID() << endl; << l.node2()->GetID() << endl;
return out; return out;
} }
ostream& operator << (ostream& out, const QFace& f) ostream& operator << (ostream& out, const QFace& f) // todo: unused in release mode
{ {
out <<"QFace nodes: "/*<< &f << " "*/; out <<"QFace nodes: "/*<< &f << " "*/;
for ( TIDSortedNodeSet::const_iterator n = f.begin(); n != f.end(); ++n ) for ( TIDSortedNodeSet::const_iterator n = f.begin(); n != f.end(); ++n )
@ -3820,6 +3820,7 @@ namespace { // Structures used by FixQuadraticElements()
#ifdef _DEBUG_ #ifdef _DEBUG_
_face = face; _face = face;
#endif #endif
(void)face; // unused in release mode
} }
//================================================================================ //================================================================================
/*! /*!
@ -4130,7 +4131,7 @@ namespace { // Structures used by FixQuadraticElements()
*/ */
//================================================================================ //================================================================================
bool QFace::IsSpoiled(const QLink* bentLink ) const bool QFace::IsSpoiled(const QLink* bentLink ) const // todo: unused
{ {
// code is valid for convex faces only // code is valid for convex faces only
gp_XYZ gc(0,0,0); gp_XYZ gc(0,0,0);
@ -4613,7 +4614,7 @@ namespace { // Structures used by FixQuadraticElements()
if ( curvNorm * D2 > 0 ) if ( curvNorm * D2 > 0 )
continue; // convex edge continue; // convex edge
} }
catch ( Standard_Failure ) catch ( Standard_Failure& )
{ {
continue; continue;
} }
@ -4728,7 +4729,7 @@ namespace { // Structures used by FixQuadraticElements()
if ( concaveU || concaveV ) if ( concaveU || concaveV )
concaveFaces.push_back( face ); concaveFaces.push_back( face );
} }
catch ( Standard_Failure ) catch ( Standard_Failure& )
{ {
concaveFaces.push_back( face ); concaveFaces.push_back( face );
} }
@ -5260,7 +5261,7 @@ void SMESH_MesherHelper::FixQuadraticElements(SMESH_ComputeErrorPtr& compError,
try { try {
gp_Vec x = x01.Normalized() + x12.Normalized(); gp_Vec x = x01.Normalized() + x12.Normalized();
trsf.SetTransformation( gp_Ax3( gp::Origin(), link1->Normal(), x), gp_Ax3() ); trsf.SetTransformation( gp_Ax3( gp::Origin(), link1->Normal(), x), gp_Ax3() );
} catch ( Standard_Failure ) { } catch ( Standard_Failure& ) {
trsf.Invert(); trsf.Invert();
} }
move.Transform(trsf); move.Transform(trsf);

View File

@ -177,7 +177,7 @@ int readLine (list <const char*> & theFields,
case '-': // real number case '-': // real number
case '+': case '+':
case '.': case '.':
isNumber = true; isNumber = true; // fall through
default: // data default: // data
isNumber = isNumber || ( *theLineBeg >= '0' && *theLineBeg <= '9' ); isNumber = isNumber || ( *theLineBeg >= '0' && *theLineBeg <= '9' );
if ( isNumber ) { if ( isNumber ) {
@ -4289,11 +4289,13 @@ void SMESH_Pattern::createElements(SMESH_Mesh* theMes
elem = aMeshDS->AddFace (nodes[0], nodes[1], nodes[2], nodes[3], elem = aMeshDS->AddFace (nodes[0], nodes[1], nodes[2], nodes[3],
nodes[4], nodes[5] ); break; nodes[4], nodes[5] ); break;
} // else do not break but create a polygon } // else do not break but create a polygon
// fall through
case 8: case 8:
if ( !onMeshElements ) {// create a quadratic face if ( !onMeshElements ) {// create a quadratic face
elem = aMeshDS->AddFace (nodes[0], nodes[1], nodes[2], nodes[3], elem = aMeshDS->AddFace (nodes[0], nodes[1], nodes[2], nodes[3],
nodes[4], nodes[5], nodes[6], nodes[7] ); break; nodes[4], nodes[5], nodes[6], nodes[7] ); break;
} // else do not break but create a polygon } // else do not break but create a polygon
// fall through
default: default:
elem = aMeshDS->AddPolygonalFace( nodes ); elem = aMeshDS->AddPolygonalFace( nodes );
} }

View File

@ -1408,6 +1408,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
loadDependentMeshes(); loadDependentMeshes();
ComputeSubMeshStateEngine( SUBMESH_LOADED ); ComputeSubMeshStateEngine( SUBMESH_LOADED );
//break; //break;
// fall through
case CHECK_COMPUTE_STATE: case CHECK_COMPUTE_STATE:
if ( IsMeshComputed() ) if ( IsMeshComputed() )
_computeState = COMPUTE_OK; _computeState = COMPUTE_OK;
@ -1459,6 +1460,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
} }
break; break;
} }
// fall through
case COMPUTE: case COMPUTE:
case COMPUTE_SUBMESH: case COMPUTE_SUBMESH:
{ {
@ -1722,6 +1724,7 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event)
loadDependentMeshes(); loadDependentMeshes();
ComputeSubMeshStateEngine( SUBMESH_LOADED ); ComputeSubMeshStateEngine( SUBMESH_LOADED );
//break; //break;
// fall through
case CHECK_COMPUTE_STATE: case CHECK_COMPUTE_STATE:
if ( IsMeshComputed() ) if ( IsMeshComputed() )
_computeState = COMPUTE_OK; _computeState = COMPUTE_OK;

View File

@ -745,9 +745,9 @@ namespace
//======================================================================= //=======================================================================
//function : ChangePolyhedronNodes //function : ChangePolyhedronNodes
//======================================================================= //=======================================================================
inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh, inline void ChangePolyhedronNodes (SMDS_Mesh* /*theMesh*/,
SMESH::log_array_var& theSeq, SMESH::log_array_var& /*theSeq*/,
CORBA::Long theId) CORBA::Long /*theId*/)
{ {
// const SMESH::long_array& anIndexes = theSeq[theId].indexes; // const SMESH::long_array& anIndexes = theSeq[theId].indexes;
// CORBA::Long iind = 0, aNbElems = theSeq[theId].number; // CORBA::Long iind = 0, aNbElems = theSeq[theId].number;

View File

@ -135,7 +135,7 @@ bool SMESH_NumberFilter::isOk (const SUIT_DataOwner* theDataOwner) const
} }
// Verify number of sub-shapes // Verify number of sub-shapes
if (mySubShapeType == TopAbs_SHAPE); if (mySubShapeType == TopAbs_SHAPE)
return true; return true;
TopTools_IndexedMapOfShape aMap; TopTools_IndexedMapOfShape aMap;

View File

@ -2759,7 +2759,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
SMESH::UpdateView(); SMESH::UpdateView();
} }
catch (std::bad_alloc) { // PAL16774 (Crash after display of many groups) catch (std::bad_alloc&) { // PAL16774 (Crash after display of many groups)
SMESH::OnVisuException(); SMESH::OnVisuException();
} }
catch (...) { // PAL16774 (Crash after display of many groups) catch (...) { // PAL16774 (Crash after display of many groups)
@ -2864,7 +2864,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
case SMESHOp::OpCreateSubMesh: case SMESHOp::OpCreateSubMesh:
if ( warnOnGeomModif() ) if ( warnOnGeomModif() )
break; // action forbiden as geometry modified break; // action forbiden as geometry modified
// fall through
case SMESHOp::OpCreateMesh: case SMESHOp::OpCreateMesh:
case SMESHOp::OpCompute: case SMESHOp::OpCompute:
case SMESHOp::OpComputeSubMesh: case SMESHOp::OpComputeSubMesh:

View File

@ -1732,6 +1732,7 @@ static QList<int> entityTypes( const int theType )
{ {
case SMESH::NODE: case SMESH::NODE:
typeIds.append( SMDSEntity_Node ); typeIds.append( SMDSEntity_Node );
break;
case SMESH::EDGE: case SMESH::EDGE:
typeIds.append( SMDSEntity_Edge ); typeIds.append( SMDSEntity_Edge );
typeIds.append( SMDSEntity_Quad_Edge ); typeIds.append( SMDSEntity_Quad_Edge );
@ -3816,6 +3817,7 @@ void SMESHGUI_FilterDlg::onSelectionDone()
myTable->SetThreshold(aRow, SMESH::toQStr( grp->GetName() )); myTable->SetThreshold(aRow, SMESH::toQStr( grp->GetName() ));
myTable->SetID (aRow, anIO->getEntry() ); myTable->SetID (aRow, anIO->getEntry() );
} }
break;
} }
default: // get a GEOM object default: // get a GEOM object
{ {

View File

@ -1152,7 +1152,7 @@ const SMESHGUI_FilterTable* SMESHGUI_FilterLibraryDlg::GetTable() const
// name : SMESHGUI_FilterLibraryDlg::onEntityTypeChanged // name : SMESHGUI_FilterLibraryDlg::onEntityTypeChanged
// Purpose : SLOT. Called when entiyt type changed // Purpose : SLOT. Called when entiyt type changed
//======================================================================= //=======================================================================
void SMESHGUI_FilterLibraryDlg::onEntityTypeChanged(const int theType) void SMESHGUI_FilterLibraryDlg::onEntityTypeChanged(const int /*theType*/)
{ {
if (myLibrary->_is_nil()) if (myLibrary->_is_nil())
return; return;
@ -1244,6 +1244,7 @@ void SMESHGUI_FilterLibraryDlg::onSelectionDone()
case SMESH::FT_BelongToMeshGroup: // get a group name and IOR case SMESH::FT_BelongToMeshGroup: // get a group name and IOR
{ {
myTable->SetThreshold(aRow, anIO->getName() ); myTable->SetThreshold(aRow, anIO->getName() );
break;
} }
default: // get a GEOM object default: // get a GEOM object
{ {

View File

@ -46,7 +46,7 @@ namespace SMESH
{ {
GEOM::GEOM_Gen_var GetGEOMGen( GEOM::GEOM_Object_ptr go ) GEOM::GEOM_Gen_var GetGEOMGen( GEOM::GEOM_Object_ptr go )
{ {
GEOM::GEOM_Gen_ptr gen; GEOM::GEOM_Gen_ptr gen = GEOM::GEOM_Gen::_nil();;
if ( !CORBA::is_nil( go )) if ( !CORBA::is_nil( go ))
gen = go->GetGen(); gen = go->GetGen();
return gen; return gen;

View File

@ -1621,7 +1621,7 @@ void SMESHGUI_MergeDlg::onSelectKeep()
// IDs to groups or vice versa // IDs to groups or vice versa
//======================================================================= //=======================================================================
void SMESHGUI_MergeDlg::onKeepSourceChanged(int isGroup) void SMESHGUI_MergeDlg::onKeepSourceChanged(int /*isGroup*/)
{ {
KeepList->clear(); KeepList->clear();
SelectKeepButton->click(); SelectKeepButton->click();

View File

@ -1804,8 +1804,8 @@ void SMESHGUI_ElemInfo::writeInfo( InfoWriter* writer, const QList<uint>& ids )
writer->write( SMESHGUI_AddInfo::tr( "TYPE" ), SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ); writer->write( SMESHGUI_AddInfo::tr( "TYPE" ), SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
} }
int size = group.size(); int size = group.size();
if ( size != -1 ); if ( size != -1 )
writer->write( SMESHGUI_AddInfo::tr( "SIZE" ), size ); writer->write( SMESHGUI_AddInfo::tr( "SIZE" ), size );
QColor color = group.color(); QColor color = group.color();
if ( color.isValid() ) if ( color.isValid() )
writer->write( SMESHGUI_AddInfo::tr( "COLOR" ), color.name() ); writer->write( SMESHGUI_AddInfo::tr( "COLOR" ), color.name() );
@ -1935,7 +1935,7 @@ void SMESHGUI_ElemInfo::writeInfo( InfoWriter* writer, const QList<uint>& ids )
writer->write( SMESHGUI_AddInfo::tr( "TYPE" ), SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) ); writer->write( SMESHGUI_AddInfo::tr( "TYPE" ), SMESHGUI_AddInfo::tr( "GROUP_ON_FILTER" ) );
} }
int size = group.size(); int size = group.size();
if ( size != -1 ); if ( size != -1 )
writer->write( SMESHGUI_AddInfo::tr( "SIZE" ), size ); writer->write( SMESHGUI_AddInfo::tr( "SIZE" ), size );
QColor color = group.color(); QColor color = group.color();
if ( color.isValid() ) if ( color.isValid() )

View File

@ -35,7 +35,7 @@ SMDS_Mesh* SMESHGUI_PreVisualObj::GetMesh() const
return myMesh; return myMesh;
} }
bool SMESHGUI_PreVisualObj::Update( int theIsClear = true ) bool SMESHGUI_PreVisualObj::Update( int /*theIsClear*/)
{ {
return false; return false;
} }

View File

@ -101,7 +101,7 @@ void SMESHGUI_PreviewDlg::toDisplaySimulation() {
// function : onDisplaySimulation // function : onDisplaySimulation
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_PreviewDlg::onDisplaySimulation(bool toDisplayPreview) { void SMESHGUI_PreviewDlg::onDisplaySimulation(bool /*toDisplayPreview*/) {
//Empty implementation here //Empty implementation here
} }
@ -212,7 +212,7 @@ void SMESHGUI_MultiPreviewDlg::toDisplaySimulation()
// function : onDisplaySimulation // function : onDisplaySimulation
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_MultiPreviewDlg::onDisplaySimulation( bool toDisplayPreview ) void SMESHGUI_MultiPreviewDlg::onDisplaySimulation( bool /*toDisplayPreview*/ )
{ {
//Empty implementation here //Empty implementation here
} }

View File

@ -573,7 +573,7 @@ void SMESHGUI_RevolutionDlg::ClickOnHelp()
// function : onAngleTextChange() // function : onAngleTextChange()
// purpose : // purpose :
//======================================================================= //=======================================================================
void SMESHGUI_RevolutionDlg::onAngleTextChange (const QString& theNewText) void SMESHGUI_RevolutionDlg::onAngleTextChange (const QString& /*theNewText*/)
{ {
bool isNumber; bool isNumber;
SpinBox_Angle->text().toDouble( &isNumber ); SpinBox_Angle->text().toDouble( &isNumber );

View File

@ -195,7 +195,7 @@ void SMESHGUI_SelectionOp::onActivateObject( int id )
// name : onDeactivateObject // name : onDeactivateObject
// purpose : // purpose :
//================================================================================= //=================================================================================
void SMESHGUI_SelectionOp::onDeactivateObject( int id ) void SMESHGUI_SelectionOp::onDeactivateObject( int /*id*/ )
{ {
removeCustomFilters(); removeCustomFilters();
} }

View File

@ -1243,16 +1243,16 @@ void SMESHGUI_SewingDlg::onMoveBorderEnd(int button)
{ {
aPRT.node1 = ( aPRT.node1 + size + dn ) % size; aPRT.node1 = ( aPRT.node1 + size + dn ) % size;
aPRT.node2 = ( aPRT.node2 + size + dn ) % size; aPRT.node2 = ( aPRT.node2 + size + dn ) % size;
break;
} }
break;
case MOVE_LEFT_2: case MOVE_LEFT_2:
case MOVE_RIGHT_2: case MOVE_RIGHT_2:
if (( isClosed ) || if (( isClosed ) ||
( 0 <= aPRT.nodeLast+dn && aPRT.nodeLast+dn < size )) ( 0 <= aPRT.nodeLast+dn && aPRT.nodeLast+dn < size ))
{ {
aPRT.nodeLast = ( aPRT.nodeLast + size + dn ) % size; aPRT.nodeLast = ( aPRT.nodeLast + size + dn ) % size;
break;
} }
break;
default: default:
return; // impossible to move return; // impossible to move
} }
@ -1584,8 +1584,8 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
if (e) if (e)
newIndices.Add(e->GetID()); newIndices.Add(e->GetID());
if (!isEvenOneExists) if (!isEvenOneExists)
isEvenOneExists = true; isEvenOneExists = true;
} }
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false); mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);

View File

@ -469,7 +469,7 @@ void SMESHGUI_ShapeByMeshOp::activateSelection()
//purpose : SLOT. Called when element type changed. //purpose : SLOT. Called when element type changed.
//======================================================================= //=======================================================================
void SMESHGUI_ShapeByMeshOp::onTypeChanged (int theType) void SMESHGUI_ShapeByMeshOp::onTypeChanged (int /*theType*/)
{ {
setElementID(""); setElementID("");
activateSelection(); activateSelection();

View File

@ -172,7 +172,7 @@ QWidget* SMESHGUI_SingleEditDlg::createButtonFrame (QWidget* theParent)
// name : isValid() // name : isValid()
// Purpose : Verify validity of input data // Purpose : Verify validity of input data
//======================================================================= //=======================================================================
bool SMESHGUI_SingleEditDlg::isValid (const bool theMess) const bool SMESHGUI_SingleEditDlg::isValid (const bool /*theMess*/) const
{ {
int id1, id2; int id1, id2;
return getNodeIds(myEdge->text(), id1, id2); return getNodeIds(myEdge->text(), id1, id2);
@ -333,7 +333,7 @@ static bool findTriangles (const SMDS_MeshNode * theNode1,
//function : onTextChange() //function : onTextChange()
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHGUI_SingleEditDlg::onTextChange (const QString& theNewText) void SMESHGUI_SingleEditDlg::onTextChange (const QString& /*theNewText*/)
{ {
if (myBusy) return; if (myBusy) return;
BusyLocker lock(myBusy); BusyLocker lock(myBusy);

View File

@ -793,6 +793,7 @@ namespace SMESH
} }
aStudy->setVisibilityStateForAll(Qtx::HiddenState); aStudy->setVisibilityStateForAll(Qtx::HiddenState);
} }
// fall through
default: { default: {
if (SMESH_Actor *anActor = FindActorByEntry(theWnd,theEntry)) { if (SMESH_Actor *anActor = FindActorByEntry(theWnd,theEntry)) {
switch (theAction) { switch (theAction) {
@ -1325,7 +1326,7 @@ namespace SMESH
int GetSelected(LightApp_SelectionMgr* theMgr, int GetSelected(LightApp_SelectionMgr* theMgr,
TColStd_IndexedMapOfInteger& theMap, TColStd_IndexedMapOfInteger& theMap,
const bool theIsElement) const bool /*theIsElement*/)
{ {
theMap.Clear(); theMap.Clear();
SALOME_ListIO selected; theMgr->selectedObjects( selected ); SALOME_ListIO selected; theMgr->selectedObjects( selected );

View File

@ -946,7 +946,7 @@ void SMESH_MeshAlgos::FindFreeBorders(SMDS_Mesh& theMesh,
++cnt; ++cnt;
bordNodes.resize( cnt + 1 ); bordNodes.resize( cnt + 1 );
BEdge* beLast; BEdge* beLast = 0;
for ( be = borders[i], cnt = 0; for ( be = borders[i], cnt = 0;
be && cnt < bordNodes.size()-1; be && cnt < bordNodes.size()-1;
be = be->myNext, ++cnt ) be = be->myNext, ++cnt )
@ -954,6 +954,7 @@ void SMESH_MeshAlgos::FindFreeBorders(SMDS_Mesh& theMesh,
bordNodes[ cnt ] = be->myBNode1->Node(); bordNodes[ cnt ] = be->myBNode1->Node();
beLast = be; beLast = be;
} }
bordNodes.back() = beLast->myBNode2->Node(); if ( beLast )
bordNodes.back() = beLast->myBNode2->Node();
} }
} }

View File

@ -546,7 +546,8 @@ struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
{ {
delete _ebbTree[i]; _ebbTree[i] = NULL; delete _ebbTree[i]; _ebbTree[i] = NULL;
} }
if ( _nodeSearcher ) delete _nodeSearcher; _nodeSearcher = 0; if ( _nodeSearcher ) delete _nodeSearcher;
_nodeSearcher = 0;
} }
virtual int FindElementsByPoint(const gp_Pnt& point, virtual int FindElementsByPoint(const gp_Pnt& point,
SMDSAbs_ElementType type, SMDSAbs_ElementType type,
@ -1673,7 +1674,7 @@ double SMESH_MeshAlgos::GetDistance( const SMDS_MeshFace* face,
try { try {
tgtCS = gp_Ax3( xyz[0], OZ, OX ); tgtCS = gp_Ax3( xyz[0], OZ, OX );
} }
catch ( Standard_Failure ) { catch ( Standard_Failure& ) {
return badDistance; return badDistance;
} }
trsf.SetTransformation( tgtCS ); trsf.SetTransformation( tgtCS );

View File

@ -116,7 +116,7 @@ Bnd_B3d* SMESH_OctreeNode::buildRootBox()
*/ */
//==================================================================================== //====================================================================================
const bool SMESH_OctreeNode::isInside ( const gp_XYZ& p, const double precision ) bool SMESH_OctreeNode::isInside ( const gp_XYZ& p, const double precision )
{ {
if ( precision <= 0.) if ( precision <= 0.)
return !( getBox()->IsOut(p) ); return !( getBox()->IsOut(p) );

View File

@ -63,7 +63,7 @@ class SMESHUtils_EXPORT SMESH_OctreeNode : public SMESH_Octree
virtual ~SMESH_OctreeNode () {}; virtual ~SMESH_OctreeNode () {};
// Tells us if Node is inside the current box with the precision "precision" // Tells us if Node is inside the current box with the precision "precision"
virtual const bool isInside(const gp_XYZ& p, const double precision = 0.); virtual bool isInside(const gp_XYZ& p, const double precision = 0.);
// Return in Result a list of Nodes potentials to be near Node // Return in Result a list of Nodes potentials to be near Node
void AllNodesAround(const SMDS_MeshNode * node, void AllNodesAround(const SMDS_MeshNode * node,

View File

@ -2358,7 +2358,7 @@ namespace
*/ */
//================================================================================ //================================================================================
void CutFace::Dump() const void CutFace::Dump() const // todo: unused in release mode
{ {
std::cout << std::endl << "INI F " << myInitFace->GetID() << std::endl; std::cout << std::endl << "INI F " << myInitFace->GetID() << std::endl;
for ( size_t i = 0; i < myLinks.size(); ++i ) for ( size_t i = 0; i < myLinks.size(); ++i )
@ -2756,7 +2756,7 @@ namespace
// add links connecting internal loops with the boundary ones // add links connecting internal loops with the boundary ones
// find a pair of closest nodes // find a pair of closest nodes
const SMDS_MeshNode *closestNode1, *closestNode2; const SMDS_MeshNode *closestNode1 = 0, *closestNode2 = 0;
double minDist = 1e100; double minDist = 1e100;
for ( size_t iE = 0; iE < loop.myLinks.size(); ++iE ) for ( size_t iE = 0; iE < loop.myLinks.size(); ++iE )
{ {
@ -2779,10 +2779,12 @@ namespace
} }
} }
size_t i = myLinks.size(); if ( closestNode1 && closestNode2 ) {
myLinks.resize( i + 2 ); size_t i = myLinks.size();
myLinks[ i ].Set( closestNode1, closestNode2 ); myLinks.resize( i + 2 );
myLinks[ i+1 ].Set( closestNode2, closestNode1 ); myLinks[ i ].Set( closestNode1, closestNode2 );
myLinks[ i+1 ].Set( closestNode2, closestNode1 );
}
} }
return true; return true;

View File

@ -421,7 +421,7 @@ namespace
if ( face2 ) if ( face2 )
polySeg.myFace[ iP ] = face2; polySeg.myFace[ iP ] = face2;
else else
;// ?? {} // todo: ??
for ( int i = 0; i < 3; ++i ) for ( int i = 0; i < 3; ++i )
{ {
nodes[ i ] = polySeg.myFace[ iP ]->GetNode( i ); nodes[ i ] = polySeg.myFace[ iP ]->GetNode( i );

View File

@ -380,7 +380,7 @@ bool Triangulate::triangulate( std::vector< const SMDS_MeshNode*>& nodes,
try { try {
axes = gp_Ax2( p0, normal, v01 ); axes = gp_Ax2( p0, normal, v01 );
} }
catch ( Standard_Failure ) { catch ( Standard_Failure& ) {
return false; return false;
} }
double factor = 1.0, modulus = normal.Modulus(); double factor = 1.0, modulus = normal.Modulus();

View File

@ -30,6 +30,7 @@ void SMESH::throwSalomeEx(const char* txt)
void SMESH::doNothing(const char* txt) void SMESH::doNothing(const char* txt)
{ {
(void)txt; // unused in release mode
MESSAGE( txt << " " << __FILE__ << ": " << __LINE__ ); MESSAGE( txt << " " << __FILE__ << ": " << __LINE__ );
} }

View File

@ -930,8 +930,8 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
if ( -1 < iGeom && iGeom < nbTypes ) if ( -1 < iGeom && iGeom < nbTypes )
Threshold = SMESH + types[ iGeom ]; Threshold = SMESH + types[ iGeom ];
#ifdef _DEBUG_ #ifdef _DEBUG_
// is types complete? (compilation failure mains that enum GeometryType changed) // is types complete? (compilation failure means that enum GeometryType changed)
int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; // _asrt[1] may be used uninitialized => replace this with static_assert?
#endif #endif
} }
if (Type == "SMESH.FT_EntityType") if (Type == "SMESH.FT_EntityType")
@ -951,7 +951,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand
Threshold = SMESH + types[ iGeom ]; Threshold = SMESH + types[ iGeom ];
#ifdef _DEBUG_ #ifdef _DEBUG_
// is 'types' complete? (compilation failure mains that enum EntityType changed) // is 'types' complete? (compilation failure mains that enum EntityType changed)
int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; int _asrt[( sizeof(types) / sizeof(const char*) == nbTypes ) ? 2 : -1 ]; _asrt[0]=_asrt[1]; // _asrt[1] may be used uninitialized => replace this with static_assert?
#endif #endif
} }
} }

View File

@ -843,7 +843,7 @@ void BelongToMeshGroup_i::SetGroupID( const char* theID ) // IOR or StoreName
std::string BelongToMeshGroup_i::GetGroupID() std::string BelongToMeshGroup_i::GetGroupID()
{ {
if ( myGroup->_is_nil() ) if ( myGroup->_is_nil() )
SMESH::SMESH_GroupBase_var( GetGroup() ); SMESH::SMESH_GroupBase_var( GetGroup() ); // todo: unnecessary parentheses?
if ( !myGroup->_is_nil() ) if ( !myGroup->_is_nil() )
myID = SMESH_Gen_i::GetORB()->object_to_string( myGroup ); myID = SMESH_Gen_i::GetORB()->object_to_string( myGroup );

View File

@ -295,7 +295,7 @@ GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( bool isShaper )
GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( GEOM::GEOM_Object_ptr go ) GEOM::GEOM_Gen_var SMESH_Gen_i::GetGeomEngine( GEOM::GEOM_Object_ptr go )
{ {
GEOM::GEOM_Gen_ptr gen; GEOM::GEOM_Gen_ptr gen = GEOM::GEOM_Gen::_nil();;
if ( !CORBA::is_nil( go )) if ( !CORBA::is_nil( go ))
gen = go->GetGen(); gen = go->GetGen();
return gen; return gen;
@ -550,7 +550,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
hypothesis_i = myHypothesis_i->_this(); hypothesis_i = myHypothesis_i->_this();
int nextId = RegisterObject( hypothesis_i ); int nextId = RegisterObject( hypothesis_i );
if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); } if(MYDEBUG) { MESSAGE( "Add hypo to map with id = "<< nextId ); }
else { nextId = 0; } // avoid "unused variable" warning in release mode else { (void)nextId; } // avoid "unused variable" warning in release mode
} }
return hypothesis_i._retn(); return hypothesis_i._retn();
} }
@ -580,7 +580,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh()
SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() ); SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() );
int nextId = RegisterObject( mesh ); int nextId = RegisterObject( mesh );
if(MYDEBUG) { MESSAGE( "Add mesh to map with id = "<< nextId); } if(MYDEBUG) { MESSAGE( "Add mesh to map with id = "<< nextId); }
else { nextId = 0; } // avoid "unused variable" warning in release mode else { (void)nextId; } // avoid "unused variable" warning in release mode
return mesh._retn(); return mesh._retn();
} }
catch (SALOME_Exception& S_ex) { catch (SALOME_Exception& S_ex) {
@ -2094,7 +2094,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
return ok; return ok;
} }
} }
catch ( std::bad_alloc ) { catch ( std::bad_alloc& ) {
INFOS( "Compute(): lack of memory" ); INFOS( "Compute(): lack of memory" );
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
@ -2304,7 +2304,7 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh
} }
} }
} }
catch ( std::bad_alloc ) { catch ( std::bad_alloc& ) {
INFOS( "Precompute(): lack of memory" ); INFOS( "Precompute(): lack of memory" );
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
@ -2388,7 +2388,7 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
return nbels._retn(); return nbels._retn();
} }
} }
catch ( std::bad_alloc ) { catch ( std::bad_alloc& ) {
INFOS( "Evaluate(): lack of memory" ); INFOS( "Evaluate(): lack of memory" );
} }
catch ( SALOME_Exception& S_ex ) { catch ( SALOME_Exception& S_ex ) {
@ -6278,7 +6278,7 @@ CORBA::Boolean SMESH_Gen_i::IsApplicable ( const char* theAlgoType,
SMESH_TRY; SMESH_TRY;
std::string aPlatformLibName; std::string aPlatformLibName;
typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char*); //typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char*);
GenericHypothesisCreator_i* aCreator = GenericHypothesisCreator_i* aCreator =
getHypothesisCreator(theAlgoType, theLibName, aPlatformLibName); getHypothesisCreator(theAlgoType, theLibName, aPlatformLibName);
if (aCreator) if (aCreator)

View File

@ -484,7 +484,7 @@ static void addReference (SALOMEDS::SObject_ptr theSObject,
*/ */
//============================================================================= //=============================================================================
SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject, SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr /*theSObject*/,
CORBA::Object_ptr theIOR, CORBA::Object_ptr theIOR,
const char* theName) const char* theName)
{ {

View File

@ -98,7 +98,8 @@ SMESH_GroupOnFilter_i::SMESH_GroupOnFilter_i( PortableServer::POA_ptr thePOA,
SMESH_GroupBase_i::~SMESH_GroupBase_i() SMESH_GroupBase_i::~SMESH_GroupBase_i()
{ {
if ( myPreMeshInfo ) delete myPreMeshInfo; myPreMeshInfo = NULL; if ( myPreMeshInfo ) delete myPreMeshInfo;
myPreMeshInfo = NULL;
} }
//======================================================================= //=======================================================================

View File

@ -193,8 +193,8 @@ namespace MeshEditor_I {
//!< Delete theNodeSearcher //!< Delete theNodeSearcher
static void Delete() static void Delete()
{ {
if ( theNodeSearcher ) delete theNodeSearcher; theNodeSearcher = 0; if ( theNodeSearcher ) { delete theNodeSearcher; } theNodeSearcher = 0;
if ( theElementSearcher ) delete theElementSearcher; theElementSearcher = 0; if ( theElementSearcher ) { delete theElementSearcher; } theElementSearcher = 0;
} }
typedef map < int, SMESH_subMesh * > TDependsOnMap; typedef map < int, SMESH_subMesh * > TDependsOnMap;
//!< The meshod called by submesh: do my main job //!< The meshod called by submesh: do my main job

View File

@ -3135,7 +3135,7 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::createSubMesh( GEOM::GEOM_Object_ptr theS
// register CORBA object for persistence // register CORBA object for persistence
int nextId = _gen_i->RegisterObject( subMesh ); int nextId = _gen_i->RegisterObject( subMesh );
if(MYDEBUG) { MESSAGE( "Add submesh to map with id = "<< nextId); } if(MYDEBUG) { MESSAGE( "Add submesh to map with id = "<< nextId); }
else { nextId = 0; } // avoid "unused variable" warning else { (void)nextId; } // avoid "unused variable" warning
// to track changes of GEOM groups // to track changes of GEOM groups
if ( subMeshId > 0 ) if ( subMeshId > 0 )
@ -5753,7 +5753,7 @@ void SMESH_Mesh_i::CreateGroupServants()
// register CORBA object for persistence // register CORBA object for persistence
int nextId = _gen_i->RegisterObject( groupVar ); int nextId = _gen_i->RegisterObject( groupVar );
if(MYDEBUG) { MESSAGE( "Add group to map with id = "<< nextId); } if(MYDEBUG) { MESSAGE( "Add group to map with id = "<< nextId); }
else { nextId = 0; } // avoid "unused variable" warning in release mode else { (void)nextId; } // avoid "unused variable" warning in release mode
// publishing the groups in the study // publishing the groups in the study
GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape ); GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape );

View File

@ -284,7 +284,7 @@ void SMESH_NoteBook::ReplaceVariables()
const char* varIndexPtr = cmdStr.ToCString() + pos; const char* varIndexPtr = cmdStr.ToCString() + pos;
if ( '0' <= *varIndexPtr && *varIndexPtr <= '9' ) if ( '0' <= *varIndexPtr && *varIndexPtr <= '9' )
varIndex = atoi( varIndexPtr ); varIndex = atoi( varIndexPtr );
if ( 0 <= varIndex && varIndex < vars.size() && !vars[varIndex].empty() ) if ( 0 <= (int)varIndex && varIndex < vars.size() && !vars[varIndex].empty() )
{ {
// replace '$VarIndex$' either by var name of var value // replace '$VarIndex$' either by var name of var value
const char var0 = vars[varIndex][0]; const char var0 = vars[varIndex][0];

View File

@ -367,7 +367,7 @@ namespace SMESH
TPythonDump& TPythonDump&
TPythonDump:: TPythonDump::
operator<<(SMESH::FilterManager_i* theArg) operator<<(SMESH::FilterManager_i* /*theArg*/)
{ {
myStream<<"aFilterManager"; myStream<<"aFilterManager";
return *this; return *this;
@ -448,13 +448,13 @@ namespace SMESH
TPythonDump& TPythonDump&
TPythonDump:: TPythonDump::
operator<<(SMESH::Measurements_i* theArg) operator<<(SMESH::Measurements_i* /*theArg*/)
{ {
myStream<<"aMeasurements"; myStream<<"aMeasurements";
return *this; return *this;
} }
TPythonDump& TPythonDump:: operator<<(SMESH_Gen_i* theArg) TPythonDump& TPythonDump:: operator<<(SMESH_Gen_i* /*theArg*/)
{ {
myStream << SMESHGenName(); return *this; myStream << SMESHGenName(); return *this;
} }
@ -671,6 +671,8 @@ namespace SMESH
{ {
#ifdef _DEBUG_ #ifdef _DEBUG_
std::cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << std::endl; std::cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << std::endl;
#else
(void)text; // todo: unused in release mode
#endif #endif
} }

View File

@ -443,7 +443,7 @@ namespace // internal utils
double a[3]; double a[3];
bool isDone[3]; bool isDone[3];
double size = -1., maxLinkLen; double size = -1., maxLinkLen;
int jLongest; int jLongest = 0;
//int nbLinks = 0; //int nbLinks = 0;
for ( int i = 1; i <= myPolyTrias->Upper(); ++i ) for ( int i = 1; i <= myPolyTrias->Upper(); ++i )

View File

@ -2218,6 +2218,8 @@ namespace
} }
#ifdef _DEBUG_ #ifdef _DEBUG_
_cellID = cellID; _cellID = cellID;
#else
(void)cellID; // unused in release mode
#endif #endif
} }
@ -2556,7 +2558,7 @@ namespace
case 3: // at a corner case 3: // at a corner
{ {
_Node& node = _hexNodes[ subEntity - SMESH_Block::ID_FirstV ]; _Node& node = _hexNodes[ subEntity - SMESH_Block::ID_FirstV ];
if ( node.Node() > 0 ) if ( node.Node() != 0 )
{ {
if ( node._intPoint ) if ( node._intPoint )
node._intPoint->Add( _eIntPoints[ iP ]->_faceIDs, _eIntPoints[ iP ]->_node ); node._intPoint->Add( _eIntPoints[ iP ]->_faceIDs, _eIntPoints[ iP ]->_node );
@ -3489,7 +3491,7 @@ namespace
continue; continue;
// perform intersection // perform intersection
E_IntersectPoint* eip, *vip; E_IntersectPoint* eip, *vip = 0; // todo: vip must be explicitly initialized to avoid warning (see below)
for ( int iDirZ = 0; iDirZ < 3; ++iDirZ ) for ( int iDirZ = 0; iDirZ < 3; ++iDirZ )
{ {
GridPlanes& planes = pln[ iDirZ ]; GridPlanes& planes = pln[ iDirZ ];
@ -3590,7 +3592,7 @@ namespace
vip = _grid->Add( ip ); vip = _grid->Add( ip );
if ( isInternal && !sameV ) if ( isInternal && !sameV )
vip->_faceIDs.push_back( _grid->PseudoIntExtFaceID() ); vip->_faceIDs.push_back( _grid->PseudoIntExtFaceID() );
if ( !addIntersection( vip, hexes, ijk, d000 ) && !sameV ) if ( !addIntersection( vip, hexes, ijk, d000 ) && !sameV ) // todo: vip must be explicitly initialized to avoid warning (see above)
_grid->Remove( vip ); _grid->Remove( vip );
ip._shapeID = edgeID; ip._shapeID = edgeID;
} }
@ -4744,6 +4746,8 @@ namespace
cout << "BUG: not shared link. IKJ = ( "<< _i << " " << _j << " " << _k << " )" << endl cout << "BUG: not shared link. IKJ = ( "<< _i << " " << _j << " " << _k << " )" << endl
<< "n1 (" << p1.X() << ", "<< p1.Y() << ", "<< p1.Z() << " )" << endl << "n1 (" << p1.X() << ", "<< p1.Y() << ", "<< p1.Z() << " )" << endl
<< "n2 (" << p2.X() << ", "<< p2.Y() << ", "<< p2.Z() << " )" << endl; << "n2 (" << p2.X() << ", "<< p2.Y() << ", "<< p2.Z() << " )" << endl;
#else
(void)link; // unused in release mode
#endif #endif
return false; return false;
} }
@ -5394,7 +5398,7 @@ namespace
if ( allQuads ) if ( allQuads )
{ {
// set side nodes as this: bottom, top, top, ... // set side nodes as this: bottom, top, top, ...
int iTop, iBot; // side indices int iTop = 0, iBot = 0; // side indices
for ( int iS = 0; iS < 6; ++iS ) for ( int iS = 0; iS < 6; ++iS )
{ {
if ( vol->_names[ iS ] == SMESH_Block::ID_Fxy0 ) if ( vol->_names[ iS ] == SMESH_Block::ID_Fxy0 )
@ -5890,7 +5894,7 @@ namespace
const int eventType, const int eventType,
SMESH_subMesh* subMeshOfSolid, SMESH_subMesh* subMeshOfSolid,
SMESH_subMeshEventListenerData* /*data*/, SMESH_subMeshEventListenerData* /*data*/,
const SMESH_Hypothesis* hyp = 0) const SMESH_Hypothesis* /*hyp*/ = 0)
{ {
if ( eventType == SMESH_subMesh::COMPUTE_EVENT ) if ( eventType == SMESH_subMesh::COMPUTE_EVENT )
{ {

View File

@ -1246,7 +1246,7 @@ bool _QuadFaceGrid::LoadGrid( SMESH_ProxyMesh& mesh )
if ( fIt->next()->NbNodes() % 4 > 0 ) if ( fIt->next()->NbNodes() % 4 > 0 )
return error("Non-quadrangular mesh faces are not allowed on sides of a composite block"); return error("Non-quadrangular mesh faces are not allowed on sides of a composite block");
bool isProxy, isTmpElem; bool isProxy = false, isTmpElem = false;
if ( faceSubMesh && faceSubMesh->NbElements() > 0 ) if ( faceSubMesh && faceSubMesh->NbElements() > 0 )
{ {
isProxy = dynamic_cast< const SMESH_ProxyMesh::SubMesh* >( faceSubMesh ); isProxy = dynamic_cast< const SMESH_ProxyMesh::SubMesh* >( faceSubMesh );
@ -1662,7 +1662,7 @@ bool _QuadFaceGrid::GetNormal( const TopoDS_Vertex& v, gp_Vec& n ) const
n = d1u.Crossed( d1v ); n = d1u.Crossed( d1v );
return true; return true;
} }
catch (Standard_Failure) { catch (Standard_Failure&) {
return false; return false;
} }
} }

View File

@ -55,7 +55,7 @@ bool Function::value( const double, double& f ) const
try { try {
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
f = pow( 10., f ); f = pow( 10., f );
} catch(Standard_Failure) { } catch(Standard_Failure&) {
f = 0.0; f = 0.0;
ok = false; ok = false;
} }
@ -185,7 +185,7 @@ FunctionExpr::FunctionExpr( const char* str, const int conv )
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
myExpr = ExprIntrp_GenExp::Create(); myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString )str ); myExpr->Process( ( Standard_CString )str );
} catch(Standard_Failure) { } catch(Standard_Failure&) {
ok = false; ok = false;
} }
@ -217,7 +217,7 @@ bool FunctionExpr::value( const double t, double& f ) const
try { try {
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
f = myExpr->Expression()->Evaluate( myVars, myValues ); f = myExpr->Expression()->Evaluate( myVars, myValues );
} catch(Standard_Failure) { } catch(Standard_Failure&) {
f = 0.0; f = 0.0;
ok = false; ok = false;
} }
@ -235,7 +235,7 @@ double FunctionExpr::integral( const double a, const double b ) const
( *static_cast<math_Function*>( const_cast<FunctionExpr*> (this) ), a, b, 20 ); ( *static_cast<math_Function*>( const_cast<FunctionExpr*> (this) ), a, b, 20 );
if( _int.IsDone() ) if( _int.IsDone() )
res = _int.Value(); res = _int.Value();
} catch(Standard_Failure) { } catch(Standard_Failure&) {
res = 0.0; res = 0.0;
MESSAGE( "Exception in integral calculating" ); MESSAGE( "Exception in integral calculating" );
} }

View File

@ -1141,6 +1141,8 @@ void StdMeshers_FaceSide::dump(const char* msg) const
MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] ); MESSAGE_ADD ( "\tF: "<<myFirst[i]<< " L: "<< myLast[i] );
MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl ); MESSAGE_END ( "\tnormPar: "<<myNormPar[i]<<endl );
} }
#else
(void)msg; // unused in release mode
#endif #endif
} }

View File

@ -178,7 +178,7 @@ bool StdMeshers_FixedPoints1D::SetParametersByMesh(const SMESH_Mesh* theMesh,
*/ */
//================================================================================ //================================================================================
bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& dflts, bool StdMeshers_FixedPoints1D::SetParametersByDefaults(const TDefaults& /*dflts*/,
const SMESH_Mesh* /*mesh*/) const SMESH_Mesh* /*mesh*/)
{ {
_nbsegs.reserve( 1 ); _nbsegs.reserve( 1 );

View File

@ -188,6 +188,7 @@ namespace // INTERNAL STUFF
case TopAbs_EDGE: case TopAbs_EDGE:
if ( SMESH_Algo::isDegenerated( TopoDS::Edge( sm->GetSubShape() ))) if ( SMESH_Algo::isDegenerated( TopoDS::Edge( sm->GetSubShape() )))
continue; continue;
// fall through
case TopAbs_FACE: case TopAbs_FACE:
_subM.insert( sm ); _subM.insert( sm );
if ( !sm->IsEmpty() ) if ( !sm->IsEmpty() )

View File

@ -226,7 +226,7 @@ void StdMeshers_NumberOfSegments::SetTableFunction(const vector<double>& table)
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
val = pow( 10.0, val ); val = pow( 10.0, val );
} }
catch(Standard_Failure) { catch(Standard_Failure&) {
throw SALOME_Exception( LOCALIZED( "invalid value")); throw SALOME_Exception( LOCALIZED( "invalid value"));
return; return;
} }
@ -319,7 +319,7 @@ bool process( const TCollection_AsciiString& str, int convMode,
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
myExpr = ExprIntrp_GenExp::Create(); myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( str.ToCString() ); myExpr->Process( str.ToCString() );
} catch(Standard_Failure) { } catch(Standard_Failure&) {
parsed_ok = false; parsed_ok = false;
} }

View File

@ -798,7 +798,7 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1()
while(itf->more()) { while(itf->more()) {
const SMDS_MeshElement* pE0 = itf->next(); const SMDS_MeshElement* pE0 = itf->next();
aElementType = pE0->GetType(); aElementType = pE0->GetType();
if (!aElementType==SMDSAbs_Face) { if (aElementType!=SMDSAbs_Face) {
continue; continue;
} }
aNbNodes = pE0->NbNodes(); aNbNodes = pE0->NbNodes();

View File

@ -557,6 +557,8 @@ namespace {
cout << "mesh.AddNode( " << p[i].X() << ", "<< p[i].Y() << ", "<< p[i].Z() << ") # " << i <<" " ; cout << "mesh.AddNode( " << p[i].X() << ", "<< p[i].Y() << ", "<< p[i].Z() << ") # " << i <<" " ;
SMESH_Block::DumpShapeID( i, cout ) << endl; SMESH_Block::DumpShapeID( i, cout ) << endl;
} }
#else
(void)p; // unused in release mode
#endif #endif
} }
} // namespace } // namespace
@ -2705,7 +2707,7 @@ bool StdMeshers_Prism_3D::project2dMesh(const TopoDS_Face& theSrcFace,
*/ */
//================================================================================ //================================================================================
bool StdMeshers_Prism_3D::setFaceAndEdgesXYZ( const int faceID, const gp_XYZ& params, int z ) bool StdMeshers_Prism_3D::setFaceAndEdgesXYZ( const int faceID, const gp_XYZ& params, int /*z*/ )
{ {
// find base and top edges of the face // find base and top edges of the face
enum { BASE = 0, TOP, LEFT, RIGHT }; enum { BASE = 0, TOP, LEFT, RIGHT };
@ -4166,7 +4168,9 @@ void StdMeshers_PrismAsBlock::faceGridToPythonDump(const SMESH_Block::TShapeID f
<< n << ", " << n+1 << ", " << n << ", " << n+1 << ", "
<< n+nb+2 << ", " << n+nb+1 << "]) " << endl; << n+nb+2 << ", " << n+nb+1 << "]) " << endl;
} }
#else
(void)face; // unused in release mode
(void)nb; // unused in release mode
#endif #endif
} }
@ -4786,6 +4790,8 @@ void StdMeshers_PrismAsBlock::TSideFace::dumpNodes(int nbNodes) const
TVerticalEdgeAdaptor* vSide1 = (TVerticalEdgeAdaptor*) VertiCurve(1); TVerticalEdgeAdaptor* vSide1 = (TVerticalEdgeAdaptor*) VertiCurve(1);
cout << "Verti side 1: "; vSide1->dumpNodes(nbNodes); cout << endl; cout << "Verti side 1: "; vSide1->dumpNodes(nbNodes); cout << endl;
delete hSize0; delete hSize1; delete vSide0; delete vSide1; delete hSize0; delete hSize1; delete vSide0; delete vSide1;
#else
(void)nbNodes; // unused in release mode
#endif #endif
} }
@ -4832,6 +4838,8 @@ void StdMeshers_PrismAsBlock::TVerticalEdgeAdaptor::dumpNodes(int nbNodes) const
cout << (*myNodeColumn)[i]->GetID() << " "; cout << (*myNodeColumn)[i]->GetID() << " ";
if ( nbNodes < (int) myNodeColumn->size() ) if ( nbNodes < (int) myNodeColumn->size() )
cout << myNodeColumn->back()->GetID(); cout << myNodeColumn->back()->GetID();
#else
(void)nbNodes; // unused in release mode
#endif #endif
} }
@ -4890,6 +4898,8 @@ void StdMeshers_PrismAsBlock::THorizontalEdgeAdaptor::dumpNodes(int nbNodes) con
side->GetColumns( u , col, col2 ); side->GetColumns( u , col, col2 );
if ( n != col->second[ i ] ) if ( n != col->second[ i ] )
cout << col->second[ i ]->GetID(); cout << col->second[ i ]->GetID();
#else
(void)nbNodes; // unused in release mode
#endif #endif
} }

View File

@ -97,7 +97,7 @@ namespace {
return max(theMeshDS[0]->ShapeToIndex(S), theMeshDS[1]->ShapeToIndex(S) ); return max(theMeshDS[0]->ShapeToIndex(S), theMeshDS[1]->ShapeToIndex(S) );
return long(S.TShape().operator->()); return long(S.TShape().operator->());
} }
void show_shape( TopoDS_Shape v, const char* msg ) // debug void show_shape( TopoDS_Shape v, const char* msg ) // debug // todo: unused in release mode
{ {
if ( v.IsNull() ) cout << msg << " NULL SHAPE" << endl; if ( v.IsNull() ) cout << msg << " NULL SHAPE" << endl;
else if (v.ShapeType() == TopAbs_VERTEX) { else if (v.ShapeType() == TopAbs_VERTEX) {
@ -106,7 +106,7 @@ namespace {
else { else {
cout << msg << " "; TopAbs::Print((v).ShapeType(),cout) <<" "<<shapeIndex((v))<<endl;} cout << msg << " "; TopAbs::Print((v).ShapeType(),cout) <<" "<<shapeIndex((v))<<endl;}
} }
void show_list( const char* msg, const list< TopoDS_Edge >& l ) // debug void show_list( const char* msg, const list< TopoDS_Edge >& l ) // debug // todo: unused in release mode
{ {
cout << msg << " "; cout << msg << " ";
list< TopoDS_Edge >::const_iterator e = l.begin(); list< TopoDS_Edge >::const_iterator e = l.begin();
@ -131,6 +131,8 @@ namespace {
show_shape( TopoDS_Shape(), "avoid warning: show_shape() defined but not used"); show_shape( TopoDS_Shape(), "avoid warning: show_shape() defined but not used");
show_list( "avoid warning: show_list() defined but not used", list< TopoDS_Edge >() ); show_list( "avoid warning: show_list() defined but not used", list< TopoDS_Edge >() );
} }
#else
(void)shape; // unused in release mode
#endif #endif
return false; return false;
} }

View File

@ -1562,7 +1562,9 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
// mapper changed, no more "mapper puts on a seam edge nodes from 2 edges" // mapper changed, no more "mapper puts on a seam edge nodes from 2 edges"
if ( isSeam && ! getBoundaryNodes ( sm, tgtFace, u2nodesOnSeam, seamNodes )) if ( isSeam && ! getBoundaryNodes ( sm, tgtFace, u2nodesOnSeam, seamNodes ))
;//RETURN_BAD_RESULT("getBoundaryNodes() failed"); {
//RETURN_BAD_RESULT("getBoundaryNodes() failed");
}
SMDS_NodeIteratorPtr nIt = smDS->GetNodes(); SMDS_NodeIteratorPtr nIt = smDS->GetNodes();
while ( nIt->more() ) while ( nIt->more() )

View File

@ -588,6 +588,7 @@ namespace {
clearPropagationChain( subMesh ); clearPropagationChain( subMesh );
} }
// return; -- hyp is modified any way // return; -- hyp is modified any way
// fall through
default: default:
//case SMESH_subMesh::MODIF_HYP: // hyp modif //case SMESH_subMesh::MODIF_HYP: // hyp modif
// clear mesh in a chain // clear mesh in a chain

View File

@ -223,7 +223,7 @@ bool StdMeshers_QuadrangleParams::SetParametersByMesh(const SMESH_Mesh* theMesh,
* \retval bool - true if parameter values have been successfully defined * \retval bool - true if parameter values have been successfully defined
*/ */
//================================================================================ //================================================================================
bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults& dflts, bool StdMeshers_QuadrangleParams::SetParametersByDefaults(const TDefaults& /*dflts*/,
const SMESH_Mesh* /*mesh*/) const SMESH_Mesh* /*mesh*/)
{ {
return true; return true;

View File

@ -439,7 +439,7 @@ namespace
{ {
// find the center and a point most distant from it // find the center and a point most distant from it
double maxDist = 0, normPar; double maxDist = 0, normPar = 0;
gp_XY uv1, uv2; gp_XY uv1, uv2;
for ( int i = 0; i < 32; ++i ) for ( int i = 0; i < 32; ++i )
{ {

View File

@ -540,7 +540,7 @@ void StdMeshers_Regular_1D::SetEventListener(SMESH_subMesh* subMesh)
*/ */
//============================================================================= //=============================================================================
void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh* subMesh) void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh* /*subMesh*/)
{ {
} }

View File

@ -5312,7 +5312,9 @@ bool _ViscousBuilder::smoothAndCheck(_SolidData& data,
} // loop on data._edgesOnShape } // loop on data._edgesOnShape
if ( !is1stBlocked ) if ( !is1stBlocked )
{
dumpFunctionEnd(); dumpFunctionEnd();
}
if ( closestFace && le ) if ( closestFace && le )
{ {
@ -5525,7 +5527,7 @@ void _ViscousBuilder::makeOffsetSurface( _EdgesOnShape& eos, SMESH_MesherHelper&
eos._offsetSurf = new ShapeAnalysis_Surface( surf ); eos._offsetSurf = new ShapeAnalysis_Surface( surf );
} }
catch ( Standard_Failure ) catch ( Standard_Failure& )
{ {
} }
} }
@ -5627,8 +5629,9 @@ void _ViscousBuilder::putOnOffsetSurface( _EdgesOnShape& eos,
<< "_InfStep" << infStep << "_" << smooStep ); << "_InfStep" << infStep << "_" << smooStep );
for ( ; i < eos._edges.size(); ++i ) for ( ; i < eos._edges.size(); ++i )
{ {
if ( eos._edges[i]->Is( _LayerEdge::MARKED )) if ( eos._edges[i]->Is( _LayerEdge::MARKED )) {
dumpMove( eos._edges[i]->_nodes.back() ); dumpMove( eos._edges[i]->_nodes.back() );
}
} }
dumpFunctionEnd(); dumpFunctionEnd();
} }
@ -7284,7 +7287,7 @@ bool _ViscousBuilder::updateNormals( _SolidData& data,
_LayerEdge* edge = e2neIt->first; _LayerEdge* edge = e2neIt->first;
_LayerEdge& newEdge = e2neIt->second; _LayerEdge& newEdge = e2neIt->second;
_EdgesOnShape* eos = data.GetShapeEdges( edge ); _EdgesOnShape* eos = data.GetShapeEdges( edge );
if ( edge->Is( _LayerEdge::BLOCKED && newEdge._maxLen > edge->_len )) if ( edge->Is( _LayerEdge::BLOCKED ) && newEdge._maxLen > edge->_len )
continue; continue;
// Check if a new _normal is OK: // Check if a new _normal is OK:
@ -9110,7 +9113,7 @@ gp_XYZ _LayerEdge::smoothAngular()
else else
norm += cross; norm += cross;
} }
catch (Standard_Failure) { // if |cross| == 0. catch (Standard_Failure&) { // if |cross| == 0.
} }
} }
gp_XYZ vec = newPos - pN; gp_XYZ vec = newPos - pN;

View File

@ -112,7 +112,7 @@ public:
* \brief Initialize my parameter values by default parameters. * \brief Initialize my parameter values by default parameters.
* \retval bool - true if parameter values have been successfully defined * \retval bool - true if parameter values have been successfully defined
*/ */
virtual bool SetParametersByDefaults(const TDefaults& /*dflts*/, const SMESH_Mesh* theMesh=0) virtual bool SetParametersByDefaults(const TDefaults& /*dflts*/, const SMESH_Mesh* /*theMesh*/=0)
{ return false; } { return false; }
static const char* GetHypType() { return "ViscousLayers"; } static const char* GetHypType() { return "ViscousLayers"; }

View File

@ -351,7 +351,7 @@ void StdMeshersGUI_DistrPreview::update()
try { try {
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
replot(); replot();
} catch(Standard_Failure) { } catch(Standard_Failure&) {
} }
} }
@ -397,7 +397,7 @@ bool StdMeshersGUI_DistrPreview::init( const QString& str )
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
myExpr = ExprIntrp_GenExp::Create(); myExpr = ExprIntrp_GenExp::Create();
myExpr->Process( ( Standard_CString ) str.toLatin1().data() ); myExpr->Process( ( Standard_CString ) str.toLatin1().data() );
} catch(Standard_Failure) { } catch(Standard_Failure&) {
parsed_ok = false; parsed_ok = false;
} }
@ -435,7 +435,7 @@ double StdMeshersGUI_DistrPreview::calc( bool& ok )
try { try {
OCC_CATCH_SIGNALS; OCC_CATCH_SIGNALS;
res = myExpr->Expression()->Evaluate( myVars, myValues ); res = myExpr->Expression()->Evaluate( myVars, myValues );
} catch(Standard_Failure) { } catch(Standard_Failure&) {
ok = false; ok = false;
res = 0.0; res = 0.0;
} }
@ -462,7 +462,7 @@ bool StdMeshersGUI_DistrPreview::convert( double& v ) const
// //
if(v < -7) v = -7.0; if(v < -7) v = -7.0;
v = pow( 10.0, v ); v = pow( 10.0, v );
} catch(Standard_Failure) { } catch(Standard_Failure&) {
v = 0.0; v = 0.0;
ok = false; ok = false;
} }

View File

@ -355,11 +355,11 @@ void StdMeshersGUI_PropagationHelperWdg::updateList(bool enable)
item->setData( Qt::UserRole, -1 ); item->setData( Qt::UserRole, -1 );
} }
else else
for ( size_t i = 0; i < myChains.size(); ++i ) for ( int i = 0; i < (int)myChains.size(); ++i )
{ {
QString text = tr( "CHAIN_NUM_NB_EDGES" ).arg( i+1 ).arg( myChains[i].size() ); QString text = tr( "CHAIN_NUM_NB_EDGES" ).arg( i+1 ).arg( myChains[i].size() );
item = new QListWidgetItem( text, myListWidget ); item = new QListWidgetItem( text, myListWidget );
item->setData( Qt::UserRole, (int) i ); item->setData( Qt::UserRole, i );
} }
} }
else else
@ -379,8 +379,8 @@ std::vector< int > * StdMeshersGUI_PropagationHelperWdg::getSelectedChain()
std::vector< int > * chain = 0; std::vector< int > * chain = 0;
if ( QListWidgetItem * item = myListWidget->currentItem() ) if ( QListWidgetItem * item = myListWidget->currentItem() )
{ {
size_t i = (size_t) item->data( Qt::UserRole ).toInt(); int i = item->data( Qt::UserRole ).toInt();
if ( 0 <= i && i < myChains.size() ) if ( 0 <= i && i < (int)myChains.size() )
chain = & myChains[i]; chain = & myChains[i];
} }
return chain; return chain;

View File

@ -137,7 +137,7 @@ CORBA::Boolean StdMeshers_Deflection1D_i::IsDimSupported( SMESH::Dimension type
*/ */
//================================================================================ //================================================================================
std::string StdMeshers_Deflection1D_i::getMethodOfParameter(const int paramIndex, std::string StdMeshers_Deflection1D_i::getMethodOfParameter(const int /*paramIndex*/,
int /*nbVars*/) const int /*nbVars*/) const
{ {
return "SetDeflection"; return "SetDeflection";

View File

@ -86,7 +86,7 @@ StdMeshers_Hexa_3D_i::~StdMeshers_Hexa_3D_i()
*/ */
//============================================================================= //=============================================================================
bool StdMeshers_Hexa_3D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int algoDim ) bool StdMeshers_Hexa_3D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int /*algoDim*/ )
{ {
return ::StdMeshers_Hexa_3D::IsApplicable( S, toCheckAll ); return ::StdMeshers_Hexa_3D::IsApplicable( S, toCheckAll );
} }

View File

@ -134,7 +134,7 @@ StdMeshers_QuadFromMedialAxis_1D2D_i::~StdMeshers_QuadFromMedialAxis_1D2D_i()
//================================================================================ //================================================================================
bool StdMeshers_QuadFromMedialAxis_1D2D_i::IsApplicable( const TopoDS_Shape &S, bool StdMeshers_QuadFromMedialAxis_1D2D_i::IsApplicable( const TopoDS_Shape &S,
bool toCheckAll, int algoDim ) bool toCheckAll, int /*algoDim*/ )
{ {
return ::StdMeshers_QuadFromMedialAxis_1D2D::IsApplicable( S, toCheckAll ); return ::StdMeshers_QuadFromMedialAxis_1D2D::IsApplicable( S, toCheckAll );
} }

View File

@ -63,7 +63,7 @@ StdMeshers_RadialQuadrangle_1D2D_i::~StdMeshers_RadialQuadrangle_1D2D_i()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool StdMeshers_RadialQuadrangle_1D2D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int algoDim ) bool StdMeshers_RadialQuadrangle_1D2D_i::IsApplicable( const TopoDS_Shape &S, bool toCheckAll, int /*algoDim*/ )
{ {
return ::StdMeshers_RadialQuadrangle_1D2D::IsApplicable( S, toCheckAll ); return ::StdMeshers_RadialQuadrangle_1D2D::IsApplicable( S, toCheckAll );
} }

View File

@ -437,7 +437,7 @@ int MESHCUT::codeGMSH(std::string type)
std::string MESHCUT::floatEnsight(float x) std::string MESHCUT::floatEnsight(float x)
{ {
char buf[12]; char buf[20];
string s; string s;
if (x < 0.0) if (x < 0.0)
sprintf(buf, "%1.5E", x); sprintf(buf, "%1.5E", x);

View File

@ -673,6 +673,7 @@ std::vector<std::string> * MeshJobManager_i::_getResourceNames() {
LOG("resource["<<i<<"] = "<<aResourceName); LOG("resource["<<i<<"] = "<<aResourceName);
resourceDefinition = _resourcesManager->GetResourceDefinition(aResourceName); resourceDefinition = _resourcesManager->GetResourceDefinition(aResourceName);
LOG("protocol["<<i<<"] = "<<resourceDefinition->protocol); LOG("protocol["<<i<<"] = "<<resourceDefinition->protocol);
(void)resourceDefinition; // unused in release mode
} }
} }