From: rnv Date: Tue, 11 Aug 2020 20:33:32 +0000 (+0300) Subject: Suppress warnings: step #1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=efc9588cb30eb5d643ce4f7121be1cf2d5b43766;p=modules%2Fkernel.git Suppress warnings: step #1 --- diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 464ae22c8..7d7932651 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -235,7 +235,7 @@ void SALOME_ContainerManager::ShutdownContainers() if(!CORBA::is_nil(cont) && pid != cont->getPID()) lstCont.push_back((*iter)); } - catch(const CORBA::Exception& e) + catch(const CORBA::Exception&) { // ignore this entry and continue } @@ -684,7 +684,7 @@ SALOME_ContainerManager::FindContainer(const Engines::ContainerParameters& param else return Engines::Container::_narrow(obj); } - catch(const CORBA::Exception& e) + catch(const CORBA::Exception&) { return Engines::Container::_nil(); } @@ -702,7 +702,7 @@ bool isPythonContainer(const char* ContainerName) { return false; // VSR 02/08/2013: Python containers are no more supported bool ret = false; - int len = strlen(ContainerName); + size_t len = strlen(ContainerName); if (len >= 2) if (strcmp(ContainerName + len - 2, "Py") == 0) @@ -908,7 +908,7 @@ std::string SALOME_ContainerManager::BuildCommandToLaunchLocalContainer(const En void SALOME_ContainerManager::RmTmpFile(std::string& tmpFileName) { - int length = tmpFileName.size(); + size_t length = tmpFileName.size(); if ( length > 0) { #ifdef WIN32 diff --git a/src/Container/Salome_file_i.cxx b/src/Container/Salome_file_i.cxx index 7475e93e0..0f481ab78 100644 --- a/src/Container/Salome_file_i.cxx +++ b/src/Container/Salome_file_i.cxx @@ -91,7 +91,7 @@ Salome_file_i::load(const char* hdf5_file) { HDFfile *hdf_file; HDFgroup *hdf_group; HDFdataset *hdf_dataset; - int size; + size_t size; int fd; char * value; char * buffer; @@ -193,7 +193,7 @@ Salome_file_i::load(const char* hdf5_file) { throw SALOME::SALOME_Exception(es); }; hdf_dataset->ReadFromDisk(buffer); - if ( write(fd,buffer,size) <0) { + if ( write(fd,buffer, static_cast(size)) <0) { SALOME::ExceptionStruct es; es.type = SALOME::INTERNAL_ERROR; std::string text = "write failed"; @@ -909,7 +909,7 @@ Engines::files* Salome_file_i::getFilesInfos() { Engines::files * infos = new Engines::files(); - infos->length(_fileManaged.size()); + infos->length(static_cast(_fileManaged.size())); _t_fileManaged::iterator begin = _fileManaged.begin(); _t_fileManaged::iterator end = _fileManaged.end(); @@ -1058,7 +1058,7 @@ Salome_file_i::getBlock(CORBA::Long fileId) // see Advanced CORBA Programming with C++ pp 187-194 CORBA::Octet *buf; buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE); - int nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp); + size_t nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp); aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership return aBlock; } diff --git a/src/DF/DF_Application.cxx b/src/DF/DF_Application.cxx index 1f7f03797..3fb265b5a 100644 --- a/src/DF/DF_Application.cxx +++ b/src/DF/DF_Application.cxx @@ -76,7 +76,8 @@ std::vector DF_Application::GetDocumentIDs() //Returns a number of existent documents int DF_Application::NbDocuments() { - return _documents.size(); + //TODO: return ot ? + return static_cast(_documents.size()); } diff --git a/src/DF/DF_Document.cxx b/src/DF/DF_Document.cxx index 99a9dea43..5447b35cf 100644 --- a/src/DF/DF_Document.cxx +++ b/src/DF/DF_Document.cxx @@ -95,7 +95,7 @@ void DF_Document::Clear() if(node) vn.push_back(node); } - for(int i = 0, len = vn.size(); iReset(); diff --git a/src/DF/DF_Label.cxx b/src/DF/DF_Label.cxx index 126717a12..7bcc0468b 100644 --- a/src/DF/DF_Label.cxx +++ b/src/DF/DF_Label.cxx @@ -190,7 +190,7 @@ bool DF_Label::ForgetAllAttributes(bool clearChildren) const std::vector va = GetAttributes(); _node->_attributes.clear(); - for(int i = 0, len = va.size(); iBeforeForget(); delete va[i]; } @@ -246,7 +246,7 @@ std::vector DF_Label::GetAttributes() const sorted.push_back(p->first); sort(sorted.begin(), sorted.end()); - int len = sorted.size(); + size_t len = sorted.size(); for(int i = 0; i_attributes[sorted[i]]); @@ -484,7 +484,7 @@ DF_LabelNode::~DF_LabelNode() for(AI p = _attributes.begin(); p!=_attributes.end(); p++) va.push_back(p->second); - for(int i = 0, len = va.size(); isecond); - for(int i = 0, len = va.size(); iGetDim(arr_dim); for( int i = 0;i < arr_ndim; i++ ) { - fprintf(fp, " %i", arr_dim[i]); + fprintf(fp, " %Ii", arr_dim[i]); } //And write the data array @@ -315,10 +315,10 @@ void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident) hdf_type type = hdf_attribute->GetType(); char* name = makeName(hdf_attribute->GetName()); - int size = hdf_attribute->GetSize(); + size_t size = hdf_attribute->GetSize(); fprintf(fp, "%s\n", ATTRIBUTE_ID); - fprintf(fp, "%s %i %i\n", name, type, size); + fprintf(fp, "%s %i %Ii\n", name, type, size); delete [] name; @@ -428,7 +428,7 @@ char* HDFascii::ConvertFromASCIIToHDF(const char* thePath, return NULL; } - int length = strlen(aTmpDir.c_str()); + size_t length = strlen(aTmpDir.c_str()); char *new_str = new char[ 1+length ]; strcpy(new_str , aTmpDir.c_str()) ; @@ -592,7 +592,7 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp) } else if(type == HDF_CHAR) { hdf_char* val = new hdf_char[size]; for(i=0; iWriteOnDisk(val); delete [] val; @@ -756,7 +756,7 @@ std::string GetTmpDir() char* makeName(char* name) { std::string aName(name), aNewName; - int i, length = aName.size(); + size_t i, length = aName.size(); char replace = (char)19; for(i=0; i or ? + return static_cast(length); }; diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx index ffef0f18b..4e4251045 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Parser_IO.cxx @@ -50,7 +50,7 @@ std::ostream & operator<< (std::ostream & f, std::ostream & operator<< (std::ostream & f, const ParserService & S) { - int i, n; + size_t i, n; f << " name : " << S.name << std::endl; f << " default : " << (S.byDefault ? "yes" : "no") << std::endl; @@ -85,7 +85,7 @@ std::ostream & operator<< (std::ostream & f, std::ostream & operator<< (std::ostream & f, const ParserInterface & I) { - int j, n; + size_t j, n; f << " name : " << I.name << std::endl; n = I.services.size(); @@ -119,7 +119,7 @@ std::ostream & operator<< (std::ostream & f, std::ostream & operator<< (std::ostream & f, const ParserComponent & C) { - int j, n; + size_t j, n; f << std::endl << " name : " << C.name << std::endl; f << " user name : " << C.username << std::endl; diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index 9e4b1b04d..e21cad8f7 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -65,8 +65,8 @@ std::list splitStringToList(const std::string& theString, const std { std::list aList; - int sepLen = theSeparator.length(); - int startPos = 0, sepPos = theString.find(theSeparator, startPos); + size_t sepLen = theSeparator.length(); + size_t startPos = 0, sepPos = theString.find(theSeparator, startPos); while (1) { @@ -323,7 +323,7 @@ SALOME_ModuleCatalogImpl::~SALOME_ModuleCatalogImpl() SALOME_ModuleCatalog::ListOfTypeDefinition* SALOME_ModuleCatalogImpl::GetTypes() { SALOME_ModuleCatalog::ListOfTypeDefinition_var type_list = new SALOME_ModuleCatalog::ListOfTypeDefinition(); - type_list->length(myPrivate->_typeList.size()); + type_list->length(static_cast(myPrivate->_typeList.size())); for (unsigned int ind = 0 ; ind < myPrivate->_typeList.size() ; ind++) { @@ -343,7 +343,7 @@ SALOME_ModuleCatalog::ListOfTypeDefinition* SALOME_ModuleCatalogImpl::GetTypes() type_list[ind].kind=SALOME_ModuleCatalog::Objref; type_list[ind].id=CORBA::string_dup(myPrivate->_typeList[ind].id.c_str()); //bases - type_list[ind].bases.length(myPrivate->_typeList[ind].bases.size()); + type_list[ind].bases.length(static_cast(myPrivate->_typeList[ind].bases.size())); std::vector::const_iterator miter; miter=myPrivate->_typeList[ind].bases.begin(); int n_memb=0; @@ -368,7 +368,7 @@ SALOME_ModuleCatalog::ListOfTypeDefinition* SALOME_ModuleCatalogImpl::GetTypes() { type_list[ind].kind=SALOME_ModuleCatalog::Struc; //members - type_list[ind].members.length(myPrivate->_typeList[ind].members.size()); + type_list[ind].members.length(static_cast(myPrivate->_typeList[ind].members.size())); std::vector< std::pair >::const_iterator miter; miter=myPrivate->_typeList[ind].members.begin(); @@ -454,7 +454,7 @@ SALOME_ModuleCatalogImpl::GetComponentList() SALOME_ModuleCatalog::ListOfComponents_var _list_components = new SALOME_ModuleCatalog::ListOfComponents; - _list_components->length(myPrivate->_personal_module_list.size()); + _list_components->length(static_cast(myPrivate->_personal_module_list.size())); // All the components defined in the personal catalog are taken for(unsigned int ind=0; ind < myPrivate->_personal_module_list.size();ind++){ @@ -462,7 +462,7 @@ SALOME_ModuleCatalogImpl::GetComponentList() if(MYDEBUG) SCRUTE(_list_components[ind]) ; } - int indice = myPrivate->_personal_module_list.size() ; + size_t indice = static_cast(myPrivate->_personal_module_list.size()) ; bool _find = false; // The components in the general catalog are taken only if they're @@ -478,9 +478,9 @@ SALOME_ModuleCatalogImpl::GetComponentList() if(!_find){ if(MYDEBUG) MESSAGE("A new component " << myPrivate->_general_module_list[ind].name << " has to be to added in the list"); - _list_components->length(indice+1); + _list_components->length(static_cast(indice+1)); // The component is not already defined => has to be taken - _list_components[indice]=(myPrivate->_general_module_list[ind].name).c_str(); + _list_components[static_cast(indice)]=(myPrivate->_general_module_list[ind].name).c_str(); if(MYDEBUG) SCRUTE(_list_components[indice]) ; indice++; @@ -510,7 +510,7 @@ SALOME_ModuleCatalogImpl::GetComponentIconeList() SALOME_ModuleCatalog::ListOfIAPP_Affich_var _list_components_icone = new SALOME_ModuleCatalog::ListOfIAPP_Affich; - _list_components_icone->length(myPrivate->_personal_module_list.size()); + _list_components_icone->length(static_cast(myPrivate->_personal_module_list.size())); // All the components defined in the personal catalog are taken for(unsigned int ind=0; ind < myPrivate->_personal_module_list.size();ind++){ @@ -523,7 +523,7 @@ SALOME_ModuleCatalogImpl::GetComponentIconeList() //if(MYDEBUG) SCRUTE(_list_components_icone[ind].moduleicone); } - int indice = myPrivate->_personal_module_list.size() ; + size_t indice = myPrivate->_personal_module_list.size() ; bool _find = false; // The components in the general catalog are taken only if they're @@ -538,13 +538,13 @@ SALOME_ModuleCatalogImpl::GetComponentIconeList() } if(!_find){ // if(MYDEBUG) MESSAGE("A new component " << _general_module_list[ind].name << " has to be to added in the list"); - _list_components_icone->length(indice+1); + _list_components_icone->length(static_cast(indice+1)); // The component is not already defined => has to be taken - _list_components_icone[indice].modulename=myPrivate->_general_module_list[ind].name.c_str(); - _list_components_icone[indice].moduleusername=myPrivate->_general_module_list[ind].username.c_str(); - _list_components_icone[indice].moduleicone=myPrivate->_general_module_list[ind].icon.c_str(); - _list_components_icone[indice].moduleversion=myPrivate->_general_module_list[ind].version.c_str(); - _list_components_icone[indice].modulecomment=myPrivate->_general_module_list[ind].comment.c_str(); + _list_components_icone[static_cast(indice)].modulename=myPrivate->_general_module_list[ind].name.c_str(); + _list_components_icone[static_cast(indice)].moduleusername=myPrivate->_general_module_list[ind].username.c_str(); + _list_components_icone[static_cast(indice)].moduleicone=myPrivate->_general_module_list[ind].icon.c_str(); + _list_components_icone[static_cast(indice)].moduleversion=myPrivate->_general_module_list[ind].version.c_str(); + _list_components_icone[static_cast(indice)].modulecomment=myPrivate->_general_module_list[ind].comment.c_str(); //if(MYDEBUG) SCRUTE(_list_components_icone[indice].modulename) ; //if(MYDEBUG) SCRUTE(_list_components_icone[indice].moduleicone); @@ -916,8 +916,8 @@ void SALOME_ModuleCatalogImpl::Private::duplicate C_corba.implementationType=SALOME_ModuleCatalog::SO; C_corba.implname = CORBA::string_dup(C_parser.implementationName.c_str()); - unsigned int _length = C_parser.interfaces.size(); - C_corba.interfaces.length(_length); + size_t _length = C_parser.interfaces.size(); + C_corba.interfaces.length(static_cast(_length)); for (unsigned int ind = 0; ind < _length; ind++) duplicate(C_corba.interfaces[ind], C_parser.interfaces[ind]); @@ -936,11 +936,11 @@ void SALOME_ModuleCatalogImpl::Private::duplicate I_corba.interfacename = CORBA::string_dup(I_parser.name.c_str()); // duplicate service list - unsigned int _length = I_parser.services.size(); + size_t _length = I_parser.services.size(); // if(MYDEBUG) SCRUTE(_length); // I_corba.interfaceservicelist // = new SALOME_ModuleCatalog::ListOfInterfaceService; - I_corba.interfaceservicelist.length(_length); + I_corba.interfaceservicelist.length(static_cast(_length)); for (unsigned int ind1 = 0; ind1 < _length ; ind1 ++) duplicate(I_corba.interfaceservicelist[ind1], @@ -963,11 +963,11 @@ void SALOME_ModuleCatalogImpl::Private::duplicate S_corba.TypeOfNode = S_parser.typeOfNode; - unsigned int _length; + size_t _length; // duplicate in Parameters _length = S_parser.inParameters.size(); - S_corba.ServiceinParameter.length(_length); + S_corba.ServiceinParameter.length(static_cast(_length)); for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_corba.ServiceinParameter[ind2], @@ -975,7 +975,7 @@ void SALOME_ModuleCatalogImpl::Private::duplicate // duplicate out Parameters _length = S_parser.outParameters.size(); - S_corba.ServiceoutParameter.length(_length); + S_corba.ServiceoutParameter.length(static_cast(_length)); for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_corba.ServiceoutParameter[ind2], @@ -983,7 +983,7 @@ void SALOME_ModuleCatalogImpl::Private::duplicate // duplicate in DataStreamParameters _length = S_parser.inDataStreamParameters.size(); - S_corba.ServiceinDataStreamParameter.length(_length); + S_corba.ServiceinDataStreamParameter.length(static_cast(_length)); for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_corba.ServiceinDataStreamParameter[ind2], @@ -992,7 +992,7 @@ void SALOME_ModuleCatalogImpl::Private::duplicate // duplicate out DataStreamParameters _length = S_parser.outDataStreamParameters.size(); // if(MYDEBUG) SCRUTE(_length); - S_corba.ServiceoutDataStreamParameter.length(_length); + S_corba.ServiceoutDataStreamParameter.length(static_cast(_length)); for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++) duplicate(S_corba.ServiceoutDataStreamParameter[ind2], diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index 348bf746e..6d92a9fc2 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -256,7 +256,7 @@ void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef, // --- The current directory is now the directory where the object should // be recorded - int sizePath = splitPath.size(); + size_t sizePath = splitPath.size(); if (sizePath > dimension_resultat){ ASSERT(sizePath == dimension_resultat+1); context_name.length(1); @@ -1176,7 +1176,7 @@ throw(ServiceUnreachable) // --- The current directory is now the directory where the object should // be destroyed - int sizePath = splitPath.size(); + size_t sizePath = splitPath.size(); if (sizePath > dimension_resultat) { ASSERT(sizePath == dimension_resultat+1); @@ -1494,13 +1494,13 @@ SALOME_NamingService::_createContextNameDir(std::string path, endWithDelim = true; if (endIdx == std::string::npos) endIdx = path.length(); - int lsub = endIdx - begIdx; + size_t lsub = endIdx - begIdx; if (lsub >= 1) splitPath.push_back(path.substr(begIdx, lsub)); begIdx = path.find_first_not_of(delims, endIdx); } - int dim; + size_t dim; if (onlyDir) // only directory part { dim = splitPath.size()-1; // omit final object @@ -1511,7 +1511,7 @@ SALOME_NamingService::_createContextNameDir(std::string path, else dim = splitPath.size(); // directories and final object - context_name.length(dim); + context_name.length(static_cast(dim)); for (int i=0; i(dim); //TODO: return or ? } // ============================================================================ diff --git a/src/Registry/RegistryService.cxx b/src/Registry/RegistryService.cxx index e06d2d617..63717c551 100644 --- a/src/Registry/RegistryService.cxx +++ b/src/Registry/RegistryService.cxx @@ -166,7 +166,7 @@ Registry::AllInfos* RegistryService::makeseq(std::map &mymap Registry::AllInfos *all = new Registry::AllInfos ; ASSERT(all) ; - const int RegLength = mymap.size(); + const size_t RegLength = mymap.size(); all->length(RegLength); std::map::iterator im; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx index d3d5ff782..629a3e0cc 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Handler.cxx @@ -290,7 +290,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMember(xmlNodePtr member_descr, ParserRe { resource.setAccessProtocolTypeStr((const char *)protocol); } - catch (const ResourcesException & e) + catch (const ResourcesException & ) { std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl; std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; @@ -312,7 +312,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMember(xmlNodePtr member_descr, ParserRe { resource.setClusterInternalProtocolStr((const char *)iprotocol); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl; std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl; @@ -462,7 +462,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser { resource.setResourceTypeStr((const char*)type); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { cerr << "Warning, invalid type \"" << (const char*)type << "\" for resource \"" << resource.Name << "\", using default value \"" << resource.getResourceTypeStr() << @@ -497,7 +497,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser { resource.setAccessProtocolTypeStr((const char *)protocol); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { cerr << "Warning, invalid protocol \"" << (const char*)protocol << "\" for resource \"" << resource.Name << "\", using default value \"" << @@ -513,7 +513,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser { resource.setClusterInternalProtocolStr((const char *)iprotocol); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { cerr << "Warning, invalid internal protocol \"" << (const char*)iprotocol << "\" for resource \"" << resource.Name << "\", using default value \"" << @@ -531,7 +531,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser { resource.setBatchTypeStr((const char *)batch); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { cerr << "Warning, invalid batch manager \"" << (const char*)batch << "\" for resource \"" << resource.Name << "\", using default value \"" << @@ -547,7 +547,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser { resource.setMpiImplTypeStr((const char *)mpi); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { cerr << "Warning, invalid MPI implementation \"" << (const char*)mpi << "\" for resource \"" << resource.Name << "\", using default value \"" << @@ -612,7 +612,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser { resource.setCanLaunchBatchJobsStr((const char *)can_launch_batch_jobs); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { cerr << "Warning, invalid can_launch_batch_jobs parameter value \"" << (const char*)can_launch_batch_jobs << "\" for resource \"" << resource.Name << @@ -628,7 +628,7 @@ SALOME_ResourcesCatalog_Handler::ProcessMachine(xmlNodePtr machine_descr, Parser { resource.setCanRunContainersStr((const char *)can_run_containers); } - catch (const ResourcesException & e) + catch (const ResourcesException &) { cerr << "Warning, invalid can_run_containers parameter value \"" << (const char*)can_run_containers << "\" for resource \"" << resource.Name << diff --git a/src/ResourcesManager/SALOME_ResourcesManager.cxx b/src/ResourcesManager/SALOME_ResourcesManager.cxx index 32ae4e4a0..5e9309318 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.cxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.cxx @@ -162,11 +162,11 @@ void SALOME_ResourcesManager::ListAllAvailableResources(Engines::ResourceList_ou machines=new Engines::ResourceList; nbProcsOfMachines=new Engines::IntegerList; std::size_t sz(ret0.size()); - machines->length(sz); nbProcsOfMachines->length(sz); + machines->length(static_cast(sz)); nbProcsOfMachines->length(static_cast(sz)); for(std::size_t j=0;j(j)]=CORBA::string_dup(ret0[j].c_str()); + (*nbProcsOfMachines)[static_cast(j)]=ret1[j]; } } diff --git a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx index 2915c897d..f9f761c7f 100644 --- a/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx +++ b/src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx @@ -163,5 +163,5 @@ const int DESTRUCTEUR_GENERIQUE_::Ajout( DESTRUCTEUR_GENERIQUE_ &objet ) //CCRT assert(Destructeurs) ; Destructeurs->push_back( &objet ) ; - return Destructeurs->size() ; + return static_cast(Destructeurs->size()) ; //TODO: return or ? }