Salome HOME
updated copyright message
[modules/kernel.git] / src / MPIContainer / MPIContainer_i.cxx
index e2fd703e4d00d8a67456592f10cfb6bd0f15e4fa..b2f30116dce03f2283fcca8dfa1e378c35e7256a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,8 +19,6 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  File   : MPIContainer_i.cxx
-//  Module : SALOME
 
 #include <iostream>
 #include <dlfcn.h>
@@ -48,7 +46,7 @@ Engines_MPIContainer_i::Engines_MPIContainer_i(CORBA::ORB_ptr orb,
                                                PortableServer::POA_ptr poa,
                                                char * containerName,
                                                int argc, char *argv[]) 
-  : Engines_Container_i(orb,poa,containerName,argc,argv,false)
+  : Engines_Container_i(orb,poa,containerName,argc,argv,nullptr,false)
 {
 
   _id = _poa->activate_object(this);
@@ -62,7 +60,7 @@ Engines_MPIContainer_i::Engines_MPIContainer_i(CORBA::ORB_ptr orb,
     _NS->init_orb( CORBA::ORB::_duplicate(_orb) ) ;
 
     std::string hostname = Kernel_Utils::GetHostname();
-    _containerName = _NS->BuildContainerNameForNS(containerName,hostname.c_str());
+    _containerName = SALOME_NamingService_Abstract::BuildContainerNameForNS(containerName,hostname.c_str());
     SCRUTE(_containerName);
     _NS->Register(pCont, _containerName.c_str());
 
@@ -121,7 +119,7 @@ bool Engines_MPIContainer_i::load_component_Library(const char* componentName, C
 {
   reason=CORBA::string_dup("");
 
-  pthread_t *th;
+  pthread_t *th = 0;
   if(_numproc == 0){
     th = new pthread_t[_nbproc];
     for(int ip=1;ip<_nbproc;ip++){
@@ -219,12 +217,12 @@ bool Engines_MPIContainer_i::Lload_component_Library(const char* componentName)
 // Create an instance of component
 Engines::EngineComponent_ptr
 Engines_MPIContainer_i::create_component_instance_env( const char* componentName,
-                                                       const Engines::FieldsDict& env,
+                                                       const Engines::FieldsDict& /*env*/,
                                                        CORBA::String_out reason)
 {
   reason=CORBA::string_dup("");
 
-  pthread_t *th;
+  pthread_t *th = 0;
   if(_numproc == 0){
     th = new pthread_t[_nbproc];
     for(int ip=1;ip<_nbproc;ip++){
@@ -398,7 +396,7 @@ Engines_MPIContainer_i::createMPIInstance(std::string genericRegisterName,
 Engines::EngineComponent_ptr Engines_MPIContainer_i::load_impl(const char* nameToRegister,
                                                  const char* componentName)
 {
-  pthread_t *th;
+  pthread_t *th = 0;
   if(_numproc == 0){
     th = new pthread_t[_nbproc];
     for(int ip=1;ip<_nbproc;ip++){
@@ -511,7 +509,7 @@ void Engines_MPIContainer_i::remove_impl(Engines::EngineComponent_ptr component_
   Engines::MPIObject_ptr pcptr;
   Engines::MPIObject_ptr spcptr;
 
-  pthread_t *th;
+  pthread_t *th = 0;
   if(_numproc == 0){
     pcptr = (Engines::MPIObject_ptr)component_i;
     th = new pthread_t[_nbproc];
@@ -545,7 +543,7 @@ void Engines_MPIContainer_i::remove_impl(Engines::EngineComponent_ptr component_
 
 void Engines_MPIContainer_i::finalize_removal()
 {
-  pthread_t *th;
+  pthread_t *th = 0;
   if(_numproc == 0){
     th = new pthread_t[_nbproc];
     for(int ip=1;ip<_nbproc;ip++){