Salome HOME
avoid compilation warnings in release mode
authoreap <eap@opencascade.com>
Wed, 5 Jun 2013 09:49:03 +0000 (09:49 +0000)
committereap <eap@opencascade.com>
Wed, 5 Jun 2013 09:49:03 +0000 (09:49 +0000)
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_MEDMesh_i.cxx
src/SMESH_I/SMESH_Mesh_i.cxx

index 090721980609f186556ad09ae4d15058ea69b093..b9a10a1357879b876b99e06d50f2ff07e9a9fb32 100644 (file)
@@ -473,7 +473,8 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
   // activate the CORBA servant of hypothesis
   hypothesis_i = SMESH::SMESH_Hypothesis::_narrow( myHypothesis_i->_this() );
   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
 
   return hypothesis_i._retn();
 }
@@ -502,7 +503,8 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh()
     // activate the CORBA servant of Mesh
     SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() );
     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
     return mesh._retn();
   }
   catch (SALOME_Exception& S_ex) {
index f338dfeac1f1bdc4ed287d92cb661178e9037d31..367a58a73ef5a3335b543d025f094655eca3374e 100644 (file)
@@ -564,8 +564,7 @@ SMESH_MEDMesh_i::getElementNumber(SALOME_MED::medConnectivity mode,
                                   const SALOME_TYPES::ListOfLong & connectivity)
   throw(SALOME::SALOME_Exception)
 {
-  const char *LOC = "getElementNumber ";
-  MESSAGE(LOC << "Pas Implemente dans SMESH");
+  MESSAGE("getElementNumber(): Pas Implemente dans SMESH");
   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
   return -1;
 }
index 0e0e82a6b1d453d30b72f4824d1f2a5055af5e87..32f1a980d1dc559beb204c275fa5c39b679530d6 100644 (file)
@@ -2155,7 +2155,8 @@ 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);
+  if(MYDEBUG) { MESSAGE( "Add submesh to map with id = "<< nextId); }
+  else        { nextId = 0; } // avoid "unused variable" warning in release mode
 
   // to track changes of GEOM groups
   addGeomGroupData( theSubShapeObject, subMesh );
@@ -2270,7 +2271,8 @@ SMESH::SMESH_GroupBase_ptr SMESH_Mesh_i::createGroup (SMESH::ElementType
 
     // register CORBA object for persistence
     int nextId = _gen_i->RegisterObject( aGroup );
-    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
 
     // to track changes of GEOM groups
     if ( !theShape.IsNull() ) {
@@ -4273,7 +4275,8 @@ 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);
+    if(MYDEBUG) { MESSAGE( "Add group to map with id = "<< nextId); }
+    else        { nextId = 0; } // avoid "unused variable" warning in release mode
 
     // publishing the groups in the study
     if ( !aStudy->_is_nil() ) {