Salome HOME
#18963 Minimize compiler warnings
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.cxx
index fe179f9a1a7682d215403772ceec9c3bffc637c7..4cb097babea672dffc5d3209e0ca373aedcbd0a4 100644 (file)
@@ -183,7 +183,6 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
 //=============================================================================
 
 void SMESH_Mesh_i::SetShape( GEOM::GEOM_Object_ptr theShapeObject )
-    throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   try {
@@ -206,7 +205,6 @@ void SMESH_Mesh_i::SetShape( GEOM::GEOM_Object_ptr theShapeObject )
 //================================================================================
 
 CORBA::Boolean SMESH_Mesh_i::HasShapeToMesh()
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   bool res = false;
@@ -226,7 +224,6 @@ CORBA::Boolean SMESH_Mesh_i::HasShapeToMesh()
 //================================================================================
 
 GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh()
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Object_var aShapeObj;
@@ -263,7 +260,7 @@ GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh()
  */
 //================================================================================
 
-CORBA::Boolean SMESH_Mesh_i::IsLoaded() throw (SALOME::SALOME_Exception)
+CORBA::Boolean SMESH_Mesh_i::IsLoaded()
 {
   Unexpect aCatch(SALOME_SalomeException);
   return !_preMeshInfo;
@@ -275,7 +272,7 @@ CORBA::Boolean SMESH_Mesh_i::IsLoaded() throw (SALOME::SALOME_Exception)
  */
 //================================================================================
 
-void SMESH_Mesh_i::Load() throw (SALOME::SALOME_Exception)
+void SMESH_Mesh_i::Load()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -288,7 +285,7 @@ void SMESH_Mesh_i::Load() throw (SALOME::SALOME_Exception)
  */
 //================================================================================
 
-void SMESH_Mesh_i::Clear() throw (SALOME::SALOME_Exception)
+void SMESH_Mesh_i::Clear()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -315,7 +312,6 @@ void SMESH_Mesh_i::Clear() throw (SALOME::SALOME_Exception)
 //================================================================================
 
 void SMESH_Mesh_i::ClearSubMesh(CORBA::Long ShapeID)
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -394,7 +390,6 @@ static SMESH::ComputeError* ConvertComputeError( SMESH_ComputeErrorPtr errorPtr
 
 SMESH::DriverMED_ReadStatus
 SMESH_Mesh_i::ImportMEDFile( const char* theFileName, const char* theMeshName )
-  throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
   int status;
@@ -433,7 +428,6 @@ SMESH_Mesh_i::ImportMEDFile( const char* theFileName, const char* theMeshName )
 SMESH::DriverMED_ReadStatus SMESH_Mesh_i::ImportCGNSFile( const char*  theFileName,
                                                           const int    theMeshIndex,
                                                           std::string& theMeshName )
-  throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
   int status;
@@ -499,7 +493,6 @@ SMESH::long_array* SMESH_Mesh_i::GetMEDVersionsCompatibleForAppend()
 //=============================================================================
 
 int SMESH_Mesh_i::ImportUNVFile( const char* theFileName )
-  throw ( SALOME::SALOME_Exception )
 {
   SMESH_TRY;
 
@@ -529,7 +522,6 @@ int SMESH_Mesh_i::ImportUNVFile( const char* theFileName )
 //=============================================================================
 
 int SMESH_Mesh_i::ImportSTLFile( const char* theFileName )
-  throw ( SALOME::SALOME_Exception )
 {
   SMESH_TRY;
 
@@ -574,7 +566,6 @@ namespace
 
 SMESH::ComputeError* SMESH_Mesh_i::ImportGMFFile( const char* theFileName,
                                                   bool        theMakeRequiredGroups )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH_ComputeErrorPtr error;
 
@@ -646,7 +637,6 @@ SMESH::Hypothesis_Status
 SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
                             SMESH::SMESH_Hypothesis_ptr anHyp,
                             CORBA::String_out           anErrorText)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
 
@@ -740,7 +730,6 @@ SMESH_Mesh_i::addHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
 
 SMESH::Hypothesis_Status SMESH_Mesh_i::RemoveHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
                                                         SMESH::SMESH_Hypothesis_ptr anHyp)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -819,7 +808,6 @@ SMESH_Mesh_i::removeHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
 
 SMESH::ListOfHypothesis *
 SMESH_Mesh_i::GetHypothesisList(GEOM::GEOM_Object_ptr aSubShape)
-throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if (MYDEBUG) MESSAGE("GetHypothesisList");
@@ -859,7 +847,7 @@ throw(SALOME::SALOME_Exception)
  */
 //================================================================================
 
-SMESH::submesh_array* SMESH_Mesh_i::GetSubMeshes() throw (SALOME::SALOME_Exception)
+SMESH::submesh_array* SMESH_Mesh_i::GetSubMeshes()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if (MYDEBUG) MESSAGE("GetSubMeshes");
@@ -903,7 +891,6 @@ SMESH::submesh_array* SMESH_Mesh_i::GetSubMeshes() throw (SALOME::SALOME_Excepti
 
 SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetSubMesh(GEOM::GEOM_Object_ptr aSubShape,
                                                   const char*           theName )
-     throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if (CORBA::is_nil(aSubShape))
@@ -955,7 +942,6 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetSubMesh(GEOM::GEOM_Object_ptr aSubShap
 //================================================================================
 
 void SMESH_Mesh_i::RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH_TRY;
 
@@ -999,7 +985,6 @@ void SMESH_Mesh_i::RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh )
 
 SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateGroup( SMESH::ElementType theElemType,
                                                   const char*        theName )
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -1031,7 +1016,6 @@ SMESH::SMESH_GroupOnGeom_ptr
 SMESH_Mesh_i::CreateGroupFromGEOM (SMESH::ElementType    theElemType,
                                    const char*           theName,
                                    GEOM::GEOM_Object_ptr theGeomObj)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -1073,7 +1057,6 @@ SMESH::SMESH_GroupOnFilter_ptr
 SMESH_Mesh_i::CreateGroupFromFilter(SMESH::ElementType theElemType,
                                     const char*        theName,
                                     SMESH::Filter_ptr  theFilter )
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -1113,7 +1096,6 @@ SMESH_Mesh_i::CreateGroupFromFilter(SMESH::ElementType theElemType,
 //================================================================================
 
 void SMESH_Mesh_i::RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup )
-  throw (SALOME::SALOME_Exception)
 {
   if ( theGroup->_is_nil() )
     return;
@@ -1153,7 +1135,6 @@ void SMESH_Mesh_i::RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup )
 //=============================================================================
 
 void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH_TRY;
   if ( _preMeshInfo )
@@ -1230,7 +1211,7 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup
  */
 //================================================================================
 
-SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups() throw(SALOME::SALOME_Exception)
+SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if (MYDEBUG) MESSAGE("GetGroups");
@@ -1269,7 +1250,7 @@ SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups() throw(SALOME::SALOME_Exception)
  */
 //=============================================================================
 
-CORBA::Long SMESH_Mesh_i::NbGroups() throw (SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbGroups()
 {
   Unexpect aCatch(SALOME_SalomeException);
   return _mapGroups.size();
@@ -1284,7 +1265,6 @@ CORBA::Long SMESH_Mesh_i::NbGroups() throw (SALOME::SALOME_Exception)
 SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
                                                   SMESH::SMESH_GroupBase_ptr theGroup2,
                                                   const char*                theName )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aResGrp;
 
@@ -1328,7 +1308,6 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionGroups( SMESH::SMESH_GroupBase_ptr the
 
 SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionListOfGroups(const SMESH::ListOfGroups& theGroups,
                                                        const char*                theName )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aResGrp;
 
@@ -1391,7 +1370,6 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::UnionListOfGroups(const SMESH::ListOfGroups
 SMESH::SMESH_Group_ptr SMESH_Mesh_i::IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
                                                       SMESH::SMESH_GroupBase_ptr theGroup2,
                                                       const char*                theName )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aResGrp;
 
@@ -1457,7 +1435,6 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::IntersectGroups( SMESH::SMESH_GroupBase_ptr
 SMESH::SMESH_Group_ptr
 SMESH_Mesh_i::IntersectListOfGroups(const SMESH::ListOfGroups& theGroups,
                                     const char*                theName )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aResGrp;
 
@@ -1541,7 +1518,6 @@ SMESH_Mesh_i::IntersectListOfGroups(const SMESH::ListOfGroups& theGroups,
 SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
                                                 SMESH::SMESH_GroupBase_ptr theGroup2,
                                                 const char*                theName )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aResGrp;
 
@@ -1608,7 +1584,6 @@ SMESH::SMESH_Group_ptr
 SMESH_Mesh_i::CutListOfGroups(const SMESH::ListOfGroups& theMainGroups,
                               const SMESH::ListOfGroups& theToolGroups,
                               const char*                theName )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aResGrp;
 
@@ -1697,25 +1672,25 @@ SMESH_Mesh_i::CutListOfGroups(const SMESH::ListOfGroups& theMainGroups,
 
 namespace // functions making checks according to SMESH::NB_COMMON_NODES_ENUM
 {
-  bool isAllNodesCommon(int nbChecked, int nbCommon, int nbNodes, int nbCorners,
+  bool isAllNodesCommon(int nbChecked, int nbCommon, int nbNodes, int /*nbCorners*/,
                         bool & toStopChecking )
   {
     toStopChecking = ( nbCommon < nbChecked );
     return nbCommon == nbNodes;
   }
-  bool isMainNodesCommon(int nbChecked, int nbCommon, int nbNodes, int nbCorners,
+  bool isMainNodesCommon(int nbChecked, int nbCommon, int /*nbNodes*/, int nbCorners,
                          bool & toStopChecking )
   {
     toStopChecking = ( nbCommon < nbChecked || nbChecked >= nbCorners );
     return nbCommon == nbCorners;
   }
-  bool isAtLeastOneNodeCommon(int nbChecked, int nbCommon, int nbNodes, int nbCorners,
-                              bool & toStopChecking )
+  bool isAtLeastOneNodeCommon(int /*nbChecked*/, int nbCommon, int /*nbNodes*/, int /*nbCorners*/,
+                              bool & /*toStopChecking*/ )
   {
     return nbCommon > 0;
   }
-  bool isMajorityOfNodesCommon(int nbChecked, int nbCommon, int nbNodes, int nbCorners,
-                               bool & toStopChecking )
+  bool isMajorityOfNodesCommon(int /*nbChecked*/, int nbCommon, int nbNodes, int /*nbCorners*/,
+                               bool & /*toStopChecking*/ )
   {
     return nbCommon >= (nbNodes+1) / 2;
   }
@@ -1741,7 +1716,6 @@ SMESH_Mesh_i::CreateDimGroup(const SMESH::ListOfIDSources& theGroups,
                              const char*                   theName,
                              SMESH::NB_COMMON_NODES_ENUM   theNbCommonNodes,
                              CORBA::Boolean                theUnderlyingOnly)
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aResGrp;
 
@@ -1922,7 +1896,6 @@ SMESH::ListOfGroups*
 SMESH_Mesh_i::FaceGroupsSeparatedByEdges( CORBA::Double  theSharpAngle,
                                           CORBA::Boolean theCreateEdges,
                                           CORBA::Boolean theUseExistingEdges )
-  throw (SALOME::SALOME_Exception)
 {
   if ( theSharpAngle < 0 || theSharpAngle > 180 )
     THROW_SALOME_CORBA_EXCEPTION("Invalid sharp angle, it must be between 0 and 180 degrees",
@@ -2050,7 +2023,6 @@ void SMESH_Mesh_i::removeGeomGroupData(CORBA::Object_ptr theSmeshObj)
 //================================================================================
 
 void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
-  throw (SALOME::SALOME_Exception)
 {
   // check if geometry changed
   bool geomChanged = true;
@@ -3053,7 +3025,6 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
 //=============================================================================
 
 SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone( SMESH::SMESH_GroupBase_ptr theGroup )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_Group_var aGroup;
 
@@ -3176,7 +3147,7 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::createSubMesh( GEOM::GEOM_Object_ptr theS
   // register CORBA object for persistence
   int nextId = _gen_i->RegisterObject( subMesh );
   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
   if ( subMeshId > 0 )
@@ -3355,7 +3326,6 @@ void SMESH_Mesh_i::removeGroup( const int theId )
 //================================================================================
 
 SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet)
-  throw(SALOME::SALOME_Exception)
 {
   SMESH::log_array_var aLog;
 
@@ -3408,7 +3378,7 @@ SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet)
  */
 //================================================================================
 
-void SMESH_Mesh_i::ClearLog() throw(SALOME::SALOME_Exception)
+void SMESH_Mesh_i::ClearLog()
 {
   SMESH_TRY;
   _impl->ClearLog();
@@ -3421,7 +3391,7 @@ void SMESH_Mesh_i::ClearLog() throw(SALOME::SALOME_Exception)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::GetId()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::GetId()
 {
   return _id;
 }
@@ -3527,7 +3497,6 @@ void SMESH_Mesh_i::SetImpl(::SMESH_Mesh * impl)
 //=============================================================================
 
 SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditor()
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_MeshEditor_var aMeshEdVar;
 
@@ -3556,7 +3525,6 @@ SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditor()
 //=============================================================================
 
 SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditPreviewer()
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::SMESH_MeshEditor_var aMeshEdVar;
 
@@ -3580,7 +3548,7 @@ SMESH::SMESH_MeshEditor_ptr SMESH_Mesh_i::GetMeshEditPreviewer()
  */
 //================================================================================
 
-CORBA::Boolean SMESH_Mesh_i::HasModificationsToDiscard() throw(SALOME::SALOME_Exception)
+CORBA::Boolean SMESH_Mesh_i::HasModificationsToDiscard()
 {
   Unexpect aCatch(SALOME_SalomeException);
   return _impl->HasModificationsToDiscard();
@@ -3628,7 +3596,7 @@ static SALOMEDS::Color getUniqueColor( const std::list<SALOMEDS::Color>& theRese
  */
 //=============================================================================
 
-void SMESH_Mesh_i::SetAutoColor(CORBA::Boolean theAutoColor) throw(SALOME::SALOME_Exception)
+void SMESH_Mesh_i::SetAutoColor(CORBA::Boolean theAutoColor)
 {
   Unexpect aCatch(SALOME_SalomeException);
   _impl->SetAutoColor(theAutoColor);
@@ -3652,7 +3620,7 @@ void SMESH_Mesh_i::SetAutoColor(CORBA::Boolean theAutoColor) throw(SALOME::SALOM
  */
 //=============================================================================
 
-CORBA::Boolean SMESH_Mesh_i::GetAutoColor() throw(SALOME::SALOME_Exception)
+CORBA::Boolean SMESH_Mesh_i::GetAutoColor()
 {
   Unexpect aCatch(SALOME_SalomeException);
   return _impl->GetAutoColor();
@@ -3769,7 +3737,6 @@ void SMESH_Mesh_i::ExportMED(const char*        file,
                              CORBA::Long        version,
                              CORBA::Boolean     overwrite,
                              CORBA::Boolean     autoDimension)
-  throw(SALOME::SALOME_Exception)
 {
   //MESSAGE("MED minor version: "<< minor);
   SMESH_TRY;
@@ -3798,7 +3765,6 @@ void SMESH_Mesh_i::ExportMED(const char*        file,
 
 void SMESH_Mesh_i::ExportSAUV (const char* file,
                                CORBA::Boolean auto_groups)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -3818,7 +3784,6 @@ void SMESH_Mesh_i::ExportSAUV (const char* file,
 //================================================================================
 
 void SMESH_Mesh_i::ExportDAT (const char *file)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -3841,7 +3806,6 @@ void SMESH_Mesh_i::ExportDAT (const char *file)
 //================================================================================
 
 void SMESH_Mesh_i::ExportUNV (const char *file)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -3864,7 +3828,6 @@ void SMESH_Mesh_i::ExportUNV (const char *file)
 //================================================================================
 
 void SMESH_Mesh_i::ExportSTL (const char *file, const bool isascii)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -3901,7 +3864,6 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
                                    const GEOM::ListOfFields& fields,
                                    const char*               geomAssocFields,
                                    CORBA::Double             ZTolerance)
-  throw (SALOME::SALOME_Exception)
 {
   MESSAGE("MED version: "<< version);
   SMESH_TRY;
@@ -4286,7 +4248,6 @@ void SMESH_Mesh_i::exportMEDFields( DriverMED_W_Field&        fieldWriter,
 
 void SMESH_Mesh_i::ExportPartToDAT(::SMESH::SMESH_IDSource_ptr meshPart,
                                    const char*                 file)
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4308,7 +4269,6 @@ void SMESH_Mesh_i::ExportPartToDAT(::SMESH::SMESH_IDSource_ptr meshPart,
 
 void SMESH_Mesh_i::ExportPartToUNV(::SMESH::SMESH_IDSource_ptr meshPart,
                                    const char*                 file)
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4331,7 +4291,6 @@ void SMESH_Mesh_i::ExportPartToUNV(::SMESH::SMESH_IDSource_ptr meshPart,
 void SMESH_Mesh_i::ExportPartToSTL(::SMESH::SMESH_IDSource_ptr meshPart,
                                    const char*                 file,
                                    ::CORBA::Boolean            isascii)
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4361,7 +4320,6 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart,
                               const char*                 file,
                               CORBA::Boolean              overwrite,
                               CORBA::Boolean              groupElemsByType)
-  throw (SALOME::SALOME_Exception)
 {
 #ifdef WITH_CGNS
   Unexpect aCatch(SALOME_SalomeException);
@@ -4400,7 +4358,6 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart,
 void SMESH_Mesh_i::ExportGMF(::SMESH::SMESH_IDSource_ptr meshPart,
                              const char*                 file,
                              bool                        withRequiredGroups)
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4439,7 +4396,7 @@ CORBA::Double SMESH_Mesh_i::GetComputeProgress()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbNodes()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbNodes()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4454,7 +4411,7 @@ CORBA::Long SMESH_Mesh_i::NbNodes()throw(SALOME::SALOME_Exception)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbElements()throw (SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbElements()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4469,7 +4426,7 @@ CORBA::Long SMESH_Mesh_i::NbElements()throw (SALOME::SALOME_Exception)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::Nb0DElements()throw (SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::Nb0DElements()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4484,7 +4441,7 @@ CORBA::Long SMESH_Mesh_i::Nb0DElements()throw (SALOME::SALOME_Exception)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbBalls() throw (SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbBalls()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4499,7 +4456,7 @@ CORBA::Long SMESH_Mesh_i::NbBalls() throw (SALOME::SALOME_Exception)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbEdges()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbEdges()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4515,7 +4472,6 @@ CORBA::Long SMESH_Mesh_i::NbEdges()throw(SALOME::SALOME_Exception)
 //================================================================================
 
 CORBA::Long SMESH_Mesh_i::NbEdgesOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4530,7 +4486,7 @@ CORBA::Long SMESH_Mesh_i::NbEdgesOfOrder(SMESH::ElementOrder order)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbFaces()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbFaces()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4545,7 +4501,7 @@ CORBA::Long SMESH_Mesh_i::NbFaces()throw(SALOME::SALOME_Exception)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbTriangles()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbTriangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4560,7 +4516,7 @@ CORBA::Long SMESH_Mesh_i::NbTriangles()throw(SALOME::SALOME_Exception)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbBiQuadTriangles()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbBiQuadTriangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4569,7 +4525,7 @@ CORBA::Long SMESH_Mesh_i::NbBiQuadTriangles()throw(SALOME::SALOME_Exception)
   return _impl->NbBiQuadTriangles();
 }
 
-CORBA::Long SMESH_Mesh_i::NbQuadrangles()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbQuadrangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4578,7 +4534,7 @@ CORBA::Long SMESH_Mesh_i::NbQuadrangles()throw(SALOME::SALOME_Exception)
   return _impl->NbQuadrangles();
 }
 
-CORBA::Long SMESH_Mesh_i::NbBiQuadQuadrangles()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbBiQuadQuadrangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4587,7 +4543,7 @@ CORBA::Long SMESH_Mesh_i::NbBiQuadQuadrangles()throw(SALOME::SALOME_Exception)
   return _impl->NbBiQuadQuadrangles();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPolygons() throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbPolygons()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4596,7 +4552,7 @@ CORBA::Long SMESH_Mesh_i::NbPolygons() throw(SALOME::SALOME_Exception)
   return _impl->NbPolygons();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPolygonsOfOrder(SMESH::ElementOrder order) throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbPolygonsOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4606,7 +4562,6 @@ CORBA::Long SMESH_Mesh_i::NbPolygonsOfOrder(SMESH::ElementOrder order) throw(SAL
 }
 
 CORBA::Long SMESH_Mesh_i::NbFacesOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4616,7 +4571,6 @@ CORBA::Long SMESH_Mesh_i::NbFacesOfOrder(SMESH::ElementOrder order)
 }
 
 CORBA::Long SMESH_Mesh_i::NbTrianglesOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4626,7 +4580,6 @@ CORBA::Long SMESH_Mesh_i::NbTrianglesOfOrder(SMESH::ElementOrder order)
 }
 
 CORBA::Long SMESH_Mesh_i::NbQuadranglesOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4637,7 +4590,7 @@ CORBA::Long SMESH_Mesh_i::NbQuadranglesOfOrder(SMESH::ElementOrder order)
 
 //=============================================================================
 
-CORBA::Long SMESH_Mesh_i::NbVolumes()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbVolumes()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4646,7 +4599,7 @@ CORBA::Long SMESH_Mesh_i::NbVolumes()throw(SALOME::SALOME_Exception)
   return _impl->NbVolumes();
 }
 
-CORBA::Long SMESH_Mesh_i::NbTetras()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbTetras()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4655,7 +4608,7 @@ CORBA::Long SMESH_Mesh_i::NbTetras()throw(SALOME::SALOME_Exception)
   return _impl->NbTetras();
 }
 
-CORBA::Long SMESH_Mesh_i::NbHexas()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbHexas()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4664,7 +4617,7 @@ CORBA::Long SMESH_Mesh_i::NbHexas()throw(SALOME::SALOME_Exception)
   return _impl->NbHexas();
 }
 
-CORBA::Long SMESH_Mesh_i::NbTriQuadraticHexas()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbTriQuadraticHexas()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4673,7 +4626,7 @@ CORBA::Long SMESH_Mesh_i::NbTriQuadraticHexas()throw(SALOME::SALOME_Exception)
   return _impl->NbTriQuadraticHexas();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPyramids()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbPyramids()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4682,7 +4635,7 @@ CORBA::Long SMESH_Mesh_i::NbPyramids()throw(SALOME::SALOME_Exception)
   return _impl->NbPyramids();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPrisms()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbPrisms()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4691,7 +4644,7 @@ CORBA::Long SMESH_Mesh_i::NbPrisms()throw(SALOME::SALOME_Exception)
   return _impl->NbPrisms();
 }
 
-CORBA::Long SMESH_Mesh_i::NbHexagonalPrisms()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbHexagonalPrisms()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4700,7 +4653,7 @@ CORBA::Long SMESH_Mesh_i::NbHexagonalPrisms()throw(SALOME::SALOME_Exception)
   return _impl->NbHexagonalPrisms();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPolyhedrons()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbPolyhedrons()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4710,7 +4663,6 @@ CORBA::Long SMESH_Mesh_i::NbPolyhedrons()throw(SALOME::SALOME_Exception)
 }
 
 CORBA::Long SMESH_Mesh_i::NbVolumesOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4720,7 +4672,6 @@ CORBA::Long SMESH_Mesh_i::NbVolumesOfOrder(SMESH::ElementOrder order)
 }
 
 CORBA::Long SMESH_Mesh_i::NbTetrasOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4730,7 +4681,6 @@ CORBA::Long SMESH_Mesh_i::NbTetrasOfOrder(SMESH::ElementOrder order)
 }
 
 CORBA::Long SMESH_Mesh_i::NbHexasOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4740,7 +4690,6 @@ CORBA::Long SMESH_Mesh_i::NbHexasOfOrder(SMESH::ElementOrder order)
 }
 
 CORBA::Long SMESH_Mesh_i::NbPyramidsOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4750,7 +4699,6 @@ CORBA::Long SMESH_Mesh_i::NbPyramidsOfOrder(SMESH::ElementOrder order)
 }
 
 CORBA::Long SMESH_Mesh_i::NbPrismsOfOrder(SMESH::ElementOrder order)
-  throw(SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4765,7 +4713,7 @@ CORBA::Long SMESH_Mesh_i::NbPrismsOfOrder(SMESH::ElementOrder order)
  */
 //=============================================================================
 
-CORBA::Long SMESH_Mesh_i::NbSubMesh()throw(SALOME::SALOME_Exception)
+CORBA::Long SMESH_Mesh_i::NbSubMesh()
 {
   Unexpect aCatch(SALOME_SalomeException);
   return _mapSubMesh_i.size();
@@ -4802,7 +4750,6 @@ SMESH::long_array* SMESH_Mesh_i::GetIDs()
 //=============================================================================
 
 SMESH::long_array* SMESH_Mesh_i::GetElementsId()
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4831,7 +4778,6 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsId()
 //=============================================================================
 
 SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemType )
-    throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4871,7 +4817,6 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemTy
 //=============================================================================
 
 SMESH::long_array* SMESH_Mesh_i::GetNodesId()
-  throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4899,7 +4844,6 @@ SMESH::long_array* SMESH_Mesh_i::GetNodesId()
 //=============================================================================
 
 SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const bool iselem )
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::ElementType type = SMESH::ALL;
   SMESH_TRY;
@@ -4921,7 +4865,6 @@ SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const boo
 //=============================================================================
 
 SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id )
-  throw (SALOME::SALOME_Exception)
 {
   if ( _preMeshInfo )
     _preMeshInfo->FullLoadFromFile();
@@ -4940,7 +4883,6 @@ SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id )
 //=============================================================================
 
 SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const CORBA::Long id )
-  throw (SALOME::SALOME_Exception)
 {
   if ( _preMeshInfo )
     _preMeshInfo->FullLoadFromFile();
@@ -4959,7 +4901,6 @@ SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const CORBA::Long id )
 //=============================================================================
 
 SMESH::long_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
-     throw (SALOME::SALOME_Exception)
 {
   SMESH::long_array_var aResult = new SMESH::long_array();
 
@@ -4996,7 +4937,6 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
 
 SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
                                                    CORBA::Boolean    all)
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::long_array_var aResult = new SMESH::long_array();
 
@@ -5048,7 +4988,6 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
 //=============================================================================
 
 SMESH::ElementType SMESH_Mesh_i::GetSubMeshElementType(const CORBA::Long ShapeID)
-  throw (SALOME::SALOME_Exception)
 {
   SMESH::ElementType type = SMESH::ALL;
 
@@ -5708,7 +5647,6 @@ SMESH::double_array* SMESH_Mesh_i::BaryCenter(const CORBA::Long id)
 SMESH::ListOfGroups*
 SMESH_Mesh_i::MakeGroupsOfBadInputElements( int         theSubShapeID,
                                             const char* theGroupName )
-  throw ( SALOME::SALOME_Exception )
 {
   Unexpect aCatch(SALOME_SalomeException);
 
@@ -5832,7 +5770,7 @@ void SMESH_Mesh_i::CreateGroupServants()
     // register CORBA object for persistence
     int nextId = _gen_i->RegisterObject( groupVar );
     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
     GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape );