From: eap Date: Wed, 5 Jun 2013 09:49:03 +0000 (+0000) Subject: avoid compilation warnings in release mode X-Git-Tag: V7_3_0a1~353 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd8276e43f9a27706696ee0198ef3a2a2017061e;p=modules%2Fsmesh.git avoid compilation warnings in release mode --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 090721980..b9a10a135 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -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) { diff --git a/src/SMESH_I/SMESH_MEDMesh_i.cxx b/src/SMESH_I/SMESH_MEDMesh_i.cxx index f338dfeac..367a58a73 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.cxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.cxx @@ -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; } diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 0e0e82a6b..32f1a980d 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -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() ) {