From 2b784ffa959ddd77a1dd7f1dce607e7159817eb4 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 16 Sep 2020 17:51:58 +0300 Subject: [PATCH] Remove another warnings --- src/Basics/BasicsGenericDestructor.cxx | 7 +-- src/Basics/BasicsGenericDestructor.hxx | 2 +- src/Basics/Test/BasicMainTest.hxx | 2 +- src/Communication/Receivers.cxx | 16 ------ src/Communication/SALOME_Comm_i.cxx | 26 +++------ src/Container/Component_i.cxx | 18 +++--- src/Container/Container_i.cxx | 4 +- src/Container/Container_init_python.cxx | 11 ++-- src/Container/SALOME_ContainerManager.cxx | 38 +++---------- src/Container/Salome_file_i.cxx | 4 +- src/DF/DF_Application.hxx | 2 +- src/DF/testDF.cxx | 7 +-- src/DSC/DSC_Basic/DSC_i.cxx | 10 ++-- .../DSC_User/Datastream/Calcium/Calcium.cxx | 6 +- .../DSC_User/Datastream/Calcium/CalciumC.c | 1 + .../Datastream/Calcium/CalciumCInterface.cxx | 2 +- .../Calcium/CalciumMacroCInterface.hxx | 2 +- .../DSC_User/Datastream/Calcium/calciumf.c | 3 +- .../Calcium/test_DataIdContainer.cxx | 2 +- src/DSC/DSC_User/Datastream/GenericPort.hxx | 4 +- .../Datastream/Palm/palm_port_factory.cxx | 2 +- src/DSC/DSC_User/test_DSC_Exception.cxx | 4 +- src/HDFPersist/HDFarrayClose.c | 42 +++++++------- src/HDFPersist/HDFarrayCreate.c | 42 +++++++------- src/HDFPersist/HDFarrayGetDim.c | 42 +++++++------- src/HDFPersist/HDFarrayGetType.c | 42 +++++++------- src/HDFPersist/HDFarrayGetTypeId.c | 42 +++++++------- src/HDFPersist/HDFarrayGetnDim.c | 42 +++++++------- src/HDFPersist/HDFattrClose.c | 42 +++++++------- src/HDFPersist/HDFattrCreate.c | 42 +++++++------- src/HDFPersist/HDFattrGetSize.c | 42 +++++++------- src/HDFPersist/HDFattrGetType.c | 42 +++++++------- src/HDFPersist/HDFattrOpen.c | 42 +++++++------- src/HDFPersist/HDFattrRead.c | 42 +++++++------- src/HDFPersist/HDFattrWrite.c | 42 +++++++------- src/HDFPersist/HDFattribute.cc | 2 +- src/HDFPersist/HDFcontainerObject.cc | 3 +- src/HDFPersist/HDFconvert.cc | 2 +- src/HDFPersist/HDFdataset.cc | 4 +- src/HDFPersist/HDFdatasetClose.c | 42 +++++++------- src/HDFPersist/HDFdatasetCreate.c | 44 +++++++-------- src/HDFPersist/HDFdatasetGetDim.c | 42 +++++++------- src/HDFPersist/HDFdatasetGetOrder.c | 42 +++++++------- src/HDFPersist/HDFdatasetGetSize.c | 44 +++++++-------- src/HDFPersist/HDFdatasetGetType.c | 42 +++++++------- src/HDFPersist/HDFdatasetGetnDim.c | 42 +++++++------- src/HDFPersist/HDFdatasetOpen.c | 42 +++++++------- src/HDFPersist/HDFdatasetRead.c | 46 +++++++-------- src/HDFPersist/HDFdatasetWrite.c | 49 ++++++++-------- src/HDFPersist/HDFerrorModeLock.c | 42 +++++++------- src/HDFPersist/HDFfileClose.c | 42 +++++++------- src/HDFPersist/HDFfileCreate.c | 42 +++++++------- src/HDFPersist/HDFfileMount.c | 42 +++++++------- src/HDFPersist/HDFfileOpen.c | 42 +++++++------- src/HDFPersist/HDFfileUmount.c | 42 +++++++------- src/HDFPersist/HDFgroupClose.c | 42 +++++++------- src/HDFPersist/HDFgroupCreate.c | 42 +++++++------- src/HDFPersist/HDFgroupOpen.c | 42 +++++++------- src/HDFPersist/HDFobjectType.c | 42 +++++++------- src/KernelHelpers/KernelHelpersUseCases.cxx | 3 +- .../SALOMEDS_DriverDefaultImpl.hxx | 4 +- src/KernelHelpers/SALOME_KernelServices.hxx | 3 + .../Test/KernelHelpersUnitTests.cxx | 1 + src/Launcher/SALOME_ExternalServerHandler.cxx | 2 +- .../SALOME_ExternalServerLauncher.cxx | 13 ++--- src/Launcher/SALOME_Launcher_Parser.cxx | 4 +- src/Launcher/TestLauncher.cxx | 2 +- src/LifeCycleCORBA/TestContainerManager.cxx | 2 +- .../libSALOME_LifeCycleCORBA.i | 2 +- src/Logger/SALOME_Trace.cxx | 2 +- src/MPIContainer/MPIContainer_i.cxx | 12 ++-- src/MPIContainer/MPIObject_i.cxx | 10 +--- src/MPIContainer/getMPIImplementation.cxx | 2 +- src/MPIContainer/testMPI2.cxx | 13 +---- .../SALOME_ModuleCatalog_Client.cxx | 7 +-- .../SALOME_ModuleCatalog_Handler.cxx | 4 +- .../SALOME_ModuleCatalog_Server.cxx | 9 +-- .../SALOME_ModuleCatalog_impl.cxx | 14 ++--- src/NamingService/SALOME_NamingService.cxx | 2 +- src/NamingService/Test/NamingServiceTest.cxx | 2 +- src/Notification/NOTIFICATION_Consumer.cxx | 4 +- src/Notification/NOTIFICATION_Supplier.cxx | 4 +- src/Registry/RegistryConnexion.cxx | 4 +- src/Registry/SALOME_Registry_Server.cxx | 9 +-- src/ResourcesManager/ResourcesManager.hxx | 4 +- .../SALOME_ResourcesCatalog_Parser.cxx | 4 +- .../SALOMEDS_AttributeParameter_i.cxx | 2 +- .../SALOMEDS_AttributeSequenceOfInteger_i.cxx | 4 +- .../SALOMEDS_AttributeSequenceOfReal_i.cxx | 12 ++-- .../SALOMEDS_AttributeTableOfInteger_i.cxx | 14 ++--- .../SALOMEDS_AttributeTableOfReal_i.cxx | 14 ++--- .../SALOMEDS_AttributeTableOfString_i.cxx | 6 +- src/SALOMEDS/SALOMEDS_Client.cxx | 2 + src/SALOMEDS/SALOMEDS_Driver_i.hxx | 2 +- src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx | 1 + src/SALOMEDS/SALOMEDS_Server.cxx | 9 ++- src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx | 2 +- src/SALOMEDS/SALOMEDS_TMPFile_i.cxx | 4 +- .../SALOMEDSImpl_AttributeStudyProperties.cxx | 4 +- .../SALOMEDSImpl_AttributeTableOfInteger.cxx | 30 +++++----- .../SALOMEDSImpl_AttributeTableOfReal.cxx | 56 +++++++++---------- .../SALOMEDSImpl_AttributeTableOfString.cxx | 40 ++++++------- src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx | 2 + .../SALOMEDSImpl_ChildIterator.hxx | 2 +- .../SALOMEDSImpl_GenericVariable.cxx | 2 +- src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx | 12 ++-- src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx | 1 + .../SALOMEDSImpl_SComponentIterator.hxx | 2 +- src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx | 14 ++--- .../SALOMEDSImpl_StudyBuilder.hxx | 2 +- src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx | 2 + .../SALOMEDSImpl_UseCaseBuilder.hxx | 2 +- .../SALOMEDSImpl_UseCaseIterator.hxx | 2 +- src/SALOMEDSImpl/testDS.cxx | 2 +- src/SALOMELocalTrace/FileTraceCollector.cxx | 14 ++--- src/SALOMELocalTrace/LocalTraceBufferPool.cxx | 21 +++---- src/SALOMELocalTrace/LocalTraceCollector.cxx | 14 ++--- .../Test/SALOMELocalTraceTest.cxx | 1 + src/SALOMESDS/SALOMESDS_RefCountServ.cxx | 2 +- src/SALOMESDS/SALOMESDS_Transaction.cxx | 2 +- .../SALOMETraceCollector.cxx | 14 ++--- .../Test/SALOMETraceCollectorTest.cxx | 1 + src/TOOLSDS/SALOMEDS_Tool.cxx | 2 +- src/TestContainer/TestLogger.cxx | 2 +- .../TestMPIComponentEngine.cxx | 1 + src/Utils/Utils_DESTRUCTEUR_GENERIQUE.cxx | 2 +- src/Utils/Utils_DESTRUCTEUR_GENERIQUE.hxx | 2 +- src/Utils/Utils_Identity.cxx | 26 ++++----- src/Utils/Utils_Identity.hxx | 10 ++-- 129 files changed, 1010 insertions(+), 1078 deletions(-) diff --git a/src/Basics/BasicsGenericDestructor.cxx b/src/Basics/BasicsGenericDestructor.cxx index dc811ee66..b31e445f2 100644 --- a/src/Basics/BasicsGenericDestructor.cxx +++ b/src/Basics/BasicsGenericDestructor.cxx @@ -59,8 +59,7 @@ void PROTECTED_DELETE::deleteInstance(PROTECTED_DELETE *anObject) return; else { - int ret; - ret = pthread_mutex_lock(&_listMutex); // acquire lock, an check again + pthread_mutex_lock(&_listMutex); // acquire lock, an check again if (std::find(_objList.begin(), _objList.end(), anObject) != _objList.end()) { @@ -69,7 +68,7 @@ void PROTECTED_DELETE::deleteInstance(PROTECTED_DELETE *anObject) DEVTRACE("PROTECTED_DELETE::deleteInstance2 " << &_objList); _objList.remove(anObject); } - ret = pthread_mutex_unlock(&_listMutex); // release lock + pthread_mutex_unlock(&_listMutex); // release lock } } @@ -186,7 +185,7 @@ void HouseKeeping( void ) */ // ============================================================================ -const int GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject) +int GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject) { DEVTRACE("GENERIC_DESTRUCTOR::Add("< *Destructors; virtual ~GENERIC_DESTRUCTOR() {}; - static const int Add(GENERIC_DESTRUCTOR &anObject); + static int Add(GENERIC_DESTRUCTOR &anObject); virtual void operator()(void) = 0; }; diff --git a/src/Basics/Test/BasicMainTest.hxx b/src/Basics/Test/BasicMainTest.hxx index debbf20ed..8c11c255d 100644 --- a/src/Basics/Test/BasicMainTest.hxx +++ b/src/Basics/Test/BasicMainTest.hxx @@ -42,7 +42,7 @@ */ // ============================================================================ -int main(int argc, char* argv[]) +int main() { // --- Create the event manager and test controller CPPUNIT_NS::TestResult controller; diff --git a/src/Communication/Receivers.cxx b/src/Communication/Receivers.cxx index 14fd55d6a..5e845041b 100644 --- a/src/Communication/Receivers.cxx +++ b/src/Communication/Receivers.cxx @@ -182,19 +182,11 @@ T *MPIReceiver::getDistValue(long &size){ SALOME::MPISender::param_var p =_mySender->getParam(); _mySender->send(); sproc = p->myproc; -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#endif while ( i != TIMEOUT && MPI_Lookup_name((char*)p->service,MPI_INFO_NULL,port_name_clt) != MPI_SUCCESS) { i++; } -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#endif if ( i == TIMEOUT ) { MPI_Finalize(); exit(-1); @@ -207,20 +199,12 @@ T *MPIReceiver::getDistValue(long &size){ // TIMEOUT is inefficient since MPI_Comm_Connect doesn't return if we asked for // a service that has been unpublished ! -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#endif i = 0; while ( i != TIMEOUT && MPI_Comm_connect(port_name_clt, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &com)!=MPI_SUCCESS ) { i++; } -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#endif if ( i == TIMEOUT ) { MPI_Finalize(); exit(-1); diff --git a/src/Communication/SALOME_Comm_i.cxx b/src/Communication/SALOME_Comm_i.cxx index 20cfab93f..c11e1b974 100644 --- a/src/Communication/SALOME_Comm_i.cxx +++ b/src/Communication/SALOME_Comm_i.cxx @@ -145,7 +145,7 @@ SALOME_SenderInt_i *SALOME_SenderInt_i::find(SALOME::SenderInt_ptr pCorba){ return dynamic_cast(ret); } -SALOME_CorbaDoubleNCSender_i::SALOME_CorbaDoubleNCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend){ +SALOME_CorbaDoubleNCSender_i::SALOME_CorbaDoubleNCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend),SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend){ } SALOME_CorbaDoubleNCSender_i::~SALOME_CorbaDoubleNCSender_i(){ @@ -166,7 +166,7 @@ SALOME::vectorOfDouble* SALOME_CorbaDoubleNCSender_i::send(){ return c1._retn(); } -SALOME_CorbaDoubleCSender_i::SALOME_CorbaDoubleCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend){ +SALOME_CorbaDoubleCSender_i::SALOME_CorbaDoubleCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend),SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend){ } SALOME_CorbaDoubleCSender_i::~SALOME_CorbaDoubleCSender_i(){ @@ -187,7 +187,7 @@ SALOME::vectorOfDouble* SALOME_CorbaDoubleCSender_i::sendPart(CORBA::ULong offse //////////////////////// -SALOME_CorbaLongNCSender_i::SALOME_CorbaLongNCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend){ +SALOME_CorbaLongNCSender_i::SALOME_CorbaLongNCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend),SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend){ } SALOME_CorbaLongNCSender_i::~SALOME_CorbaLongNCSender_i(){ @@ -208,7 +208,7 @@ SALOME::vectorOfLong* SALOME_CorbaLongNCSender_i::send(){ return c1._retn(); } -SALOME_CorbaLongCSender_i::SALOME_CorbaLongCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend){ +SALOME_CorbaLongCSender_i::SALOME_CorbaLongCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend),SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend){ } SALOME_CorbaLongCSender_i::~SALOME_CorbaLongCSender_i(){ @@ -254,25 +254,17 @@ SALOME::MPISender::param* SALOME_MPISender_i::getParam() p->tag2 =_tag2; _tag2Inst=_tag2; std::string service("toto_"); - sprintf(stag,"%d_",_tag1); + sprintf(stag,"%ld_",_tag1); service += stag; sprintf(stag,"%d_",p->tag2); service += stag; p->service = CORBA::string_dup(service.c_str()); MPI_Open_port(MPI_INFO_NULL, _portName); -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#endif while ( i != TIMEOUT && MPI_Publish_name((char*)service.c_str(),MPI_INFO_NULL,_portName) != MPI_SUCCESS) { i++; } -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#endif if ( i == TIMEOUT ) { MPI_Close_port(_portName); MPI_Finalize(); @@ -336,14 +328,14 @@ void SALOME_MPISender_i::close(const SALOME::MPISender::param& p) } SALOME_MPISenderDouble_i::SALOME_MPISenderDouble_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend) - :SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend) - ,SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend) + :SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend) + ,SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend) { } SALOME_MPISenderInt_i::SALOME_MPISenderInt_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend) - :SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend) - ,SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend) + :SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend) + ,SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend) { } diff --git a/src/Container/Component_i.cxx b/src/Container/Component_i.cxx index fa8a84591..a0ebb8e9c 100644 --- a/src/Container/Component_i.cxx +++ b/src/Container/Component_i.cxx @@ -64,7 +64,7 @@ bool Engines_Component_i::_isMultiInstance = false; */ //============================================================================= -Engines_Component_i::Engines_Component_i():_myConnexionToRegistry(0), _notifSupplier(0), _id(0) +Engines_Component_i::Engines_Component_i(): _id(0), _myConnexionToRegistry(0), _notifSupplier(0) { //ASSERT(0); MESSAGE("Default Constructor, not for normal use..."); @@ -93,15 +93,15 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, bool regist ) : _instanceName(instanceName), _interfaceName(interfaceName), + _id(0), + _contId(0), _myConnexionToRegistry(0), _notifSupplier(0), + _graphName("") , + _nodeName(""), _ThreadId(0) , _ThreadCpuUsed(0) , _Executed(false) , - _graphName("") , - _nodeName(""), - _id(0), - _contId(0), _CanceledThread(false) { MESSAGE("Component constructor with instanceName "<< _instanceName); @@ -146,15 +146,15 @@ Engines_Component_i::Engines_Component_i(CORBA::ORB_ptr orb, bool regist) : _instanceName(instanceName), _interfaceName(interfaceName), + _id(0), + _contId(0), _myConnexionToRegistry(0), _notifSupplier(0), + _graphName("") , + _nodeName(""), _ThreadId(0) , _ThreadCpuUsed(0) , _Executed(false) , - _graphName("") , - _nodeName(""), - _id(0), - _contId(0), _CanceledThread(false) { MESSAGE("Component constructor with instanceName "<< _instanceName); diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 4b2a4787a..ec10aaedd 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -119,7 +119,7 @@ int findpathof(const std::string& path, std::string&, const std::string&); //============================================================================= Engines_Container_i::Engines_Container_i () : -_numInstance(0),_id(0),_NS(0) + _NS(0),_id(0),_numInstance(0) { } @@ -136,7 +136,7 @@ Engines_Container_i::Engines_Container_i (CORBA::ORB_ptr orb, bool activAndRegist, bool isServantAloneInProcess ) : - _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess),_id(0),_NS(0) + _NS(0),_id(0),_numInstance(0),_isServantAloneInProcess(isServantAloneInProcess) { _pid = (long)getpid(); diff --git a/src/Container/Container_init_python.cxx b/src/Container/Container_init_python.cxx index 4af0f0135..744474d4d 100644 --- a/src/Container/Container_init_python.cxx +++ b/src/Container/Container_init_python.cxx @@ -73,7 +73,7 @@ ContainerPyStdOut_write(ContainerPyStdOut *self, PyObject *args) } static PyObject* -ContainerPyStdOut_flush(ContainerPyStdOut* /*self*/) +ContainerPyStdOut_flush(ContainerPyStdOut */*self*/, PyObject */*args*/) { Py_INCREF(Py_None); return Py_None; @@ -82,13 +82,12 @@ ContainerPyStdOut_flush(ContainerPyStdOut* /*self*/) static PyMethodDef ContainerPyStdOut_methods[] = { {"write", (PyCFunction)ContainerPyStdOut_write, METH_VARARGS, PyDoc_STR("write(string) -> None")}, {"flush", (PyCFunction)ContainerPyStdOut_flush, METH_NOARGS, PyDoc_STR("flush() -> None")}, - {NULL, NULL} /* sentinel */ + {0, 0, 0, 0} /* sentinel */ }; static PyMemberDef ContainerPyStdOut_memberlist[] = { - {(char*)"softspace", T_INT, offsetof(ContainerPyStdOut, softspace), 0, - (char*)"flag indicating that a space needs to be printed; used by print"}, - {NULL} /* Sentinel */ + {(char*)"softspace", T_INT, offsetof(ContainerPyStdOut, softspace), 0, (char*)"flag indicating that a space needs to be printed; used by print"}, + {0, 0, 0, 0, 0} /* sentinel */ }; static PyTypeObject ContainerPyStdOut_Type = { @@ -201,7 +200,7 @@ void KERNEL_PYTHON::init_python(int argc, char **argv) script += "import sys\n"; script += "sys.excepthook = _custom_except_hook\n"; script += "del _custom_except_hook, sys\n"; - int res = PyRun_SimpleString(script.c_str()); + PyRun_SimpleString(script.c_str()); // VSR (22/09/2016): end of workaround PyEval_InitThreads(); // Create (and acquire) the interpreter lock diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 69acb29e2..dec227ae9 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -380,11 +380,7 @@ Engines::Container_ptr SALOME_ContainerManager::GiveContainer(const Engines::Con std::string hostname(resource_definition.HostName); std::string containerNameInNS; if(params.isMPI){ - int nbproc; - if ( params.nb_proc <= 0 ) - nbproc = 1; - else - nbproc = params.nb_proc; + int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc; try { if( GetenvThreadSafe("LIBBATCH_NODEFILE") != NULL ) @@ -742,21 +738,12 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer(const std::string& command = BuildTempFileToLaunchRemoteContainer(resource_name, params, tmpFileName); else { - int nbproc; const ParserResourcesType resInfo(_resManager->GetResourceDefinition(resource_name)); - if (params.isMPI) - { - if ( params.nb_proc <= 0 ) - nbproc = 1; - else - nbproc = params.nb_proc; - } - std::string wdir = params.workingdir.in(); - // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \ - // SALOME_Container containerName -ORBInitRef NameService=IOR:01000..." + // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir + // SALOME_Container containerName -ORBInitRef NameService=IOR:01000..." // or // "ssh -l user machine distantLauncher remote -p hostNS -m portNS -d dir // -- SALOME_Container contName -ORBInitRef NameService=IOR:01000..." @@ -766,6 +753,7 @@ SALOME_ContainerManager::BuildCommandToLaunchRemoteContainer(const std::string& if(params.isMPI) { + int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc; command += " mpirun -np "; std::ostringstream o; o << nbproc << " "; @@ -806,18 +794,14 @@ std::string SALOME_ContainerManager::BuildCommandToLaunchLocalContainer(const En { tmpFileName = BuildTemporaryFileName(); std::string command; - int nbproc = 0; std::ostringstream o; if (params.isMPI) { - o << "mpirun -np "; + int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc; - if ( params.nb_proc <= 0 ) - nbproc = 1; - else - nbproc = params.nb_proc; + o << "mpirun -np "; o << nbproc << " "; @@ -1060,15 +1044,9 @@ std::string SALOME_ContainerManager::BuildTempFileToLaunchRemoteContainer (const if (params.isMPI) { - tempOutputFile << "mpirun -np "; - int nbproc; - - if ( params.nb_proc <= 0 ) - nbproc = 1; - else - nbproc = params.nb_proc; + int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc; - std::ostringstream o; + tempOutputFile << "mpirun -np "; tempOutputFile << nbproc << " "; #ifdef LAM_MPI diff --git a/src/Container/Salome_file_i.cxx b/src/Container/Salome_file_i.cxx index f0cb61444..6e9ad9620 100644 --- a/src/Container/Salome_file_i.cxx +++ b/src/Container/Salome_file_i.cxx @@ -191,7 +191,7 @@ Salome_file_i::load(const char* hdf5_file) { std::string text = "open failed"; es.text = CORBA::string_dup(text.c_str()); throw SALOME::SALOME_Exception(es); - }; + } hdf_dataset->ReadFromDisk(buffer); if ( write(fd,buffer,(unsigned int)size) <0) { SALOME::ExceptionStruct es; @@ -199,7 +199,7 @@ Salome_file_i::load(const char* hdf5_file) { std::string text = "write failed"; es.text = CORBA::string_dup(text.c_str()); throw SALOME::SALOME_Exception(es); - }; + } // Close the target file ::close(fd); diff --git a/src/DF/DF_Application.hxx b/src/DF/DF_Application.hxx index 1c686f2fe..8d81a6c7c 100644 --- a/src/DF/DF_Application.hxx +++ b/src/DF/DF_Application.hxx @@ -31,7 +31,7 @@ public: //Constructor Standard_EXPORT DF_Application(); - Standard_EXPORT ~DF_Application(); + Standard_EXPORT virtual ~DF_Application(); //Creates a new document with given type, returns a smart pointer to //newly created document. diff --git a/src/DF/testDF.cxx b/src/DF/testDF.cxx index 0811fa536..f6fb9ea8a 100644 --- a/src/DF/testDF.cxx +++ b/src/DF/testDF.cxx @@ -72,9 +72,8 @@ void GetSystemDate(int& year, int& month, int& day, int& hours, int& minutes, in struct tm transfert; struct timeval tval; struct timezone tzone; - int status; - - status = gettimeofday( &tval, &tzone ); + + gettimeofday( &tval, &tzone ); memcpy(&transfert, localtime((time_t *)&tval.tv_sec), sizeof(tm)); month = transfert.tm_mon + 1; @@ -185,7 +184,7 @@ std::vector splitString(const std::string& theValue, char separator } -int main (int argc, char * argv[]) +int main () { std::cout << "Test started " << std::endl; diff --git a/src/DSC/DSC_Basic/DSC_i.cxx b/src/DSC/DSC_Basic/DSC_i.cxx index dd2efd383..9af65a3a2 100644 --- a/src/DSC/DSC_Basic/DSC_i.cxx +++ b/src/DSC/DSC_Basic/DSC_i.cxx @@ -34,11 +34,11 @@ Engines_DSC_i(CORBA::ORB_ptr orb, PortableServer::ObjectId * contId, const char *instanceName, const char *interfaceName, - bool notif) : Engines_Component_i(orb, - poa, - contId, - instanceName, - interfaceName) + bool /*notif*/) : Engines_Component_i(orb, + poa, + contId, + instanceName, + interfaceName) { #ifdef MYDEBUG std::cerr << "--Engines_DSC_i: MARK 1 --" << instanceName << "----" << std::endl; diff --git a/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx b/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx index 431ac02f1..503caf567 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/Calcium.cxx @@ -31,7 +31,7 @@ PySupervCompo::PySupervCompo( CORBA::ORB_ptr orb, Engines::Container_ptr contain, const char *instanceName, const char *interfaceName, - bool notif) : + bool /*notif*/) : Superv_Component_i(orb, poa,contain, instanceName, interfaceName,false,false) { } @@ -97,7 +97,7 @@ extern "C" if(std::string(mode) == "IN") { - provides_port * port ; + provides_port * port = 0; //provides port try { @@ -125,7 +125,7 @@ extern "C" } else if(std::string(mode) == "OUT") { - uses_port * uport ; + uses_port * uport = 0; try { uport = compo->create_uses_data_port(type); diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumC.c b/src/DSC/DSC_User/Datastream/Calcium/CalciumC.c index 72f09ae8f..cae24a41b 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumC.c +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumC.c @@ -97,6 +97,7 @@ InfoType ecp_lch(void * component, int mode, float * ti, float * tf, int size_t _nRead; long _i=*i; + (void)strSize; // unused parameter fflush(stdout);fflush(stderr); InfoType info = ecp_lecture_str (component, mode, ti, tf, &_i, diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx index 83f69c646..291de3ab4 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumCInterface.cxx @@ -91,7 +91,7 @@ ecp_fin_ (void * component, int code) { return ex.getInfo(); } return CalciumTypes::CPOK; -}; +} extern "C" CalciumTypes::InfoType ecp_cd_ (void * component, char * instanceName) { diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx index 66555ccbe..fba20651a 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumMacroCInterface.hxx @@ -105,7 +105,7 @@ Id : $Id$ *ti=(CalTimeType< _type _qual >::TimeType)(_ti); \ DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) \ return CalciumTypes::CPOK; \ - }; \ + } \ \ \ extern "C" void ecp_lecture_##_name##_free ( _type _qual * data) \ diff --git a/src/DSC/DSC_User/Datastream/Calcium/calciumf.c b/src/DSC/DSC_User/Datastream/Calcium/calciumf.c index 543b15e2f..b99182b45 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/calciumf.c +++ b/src/DSC/DSC_User/Datastream/Calcium/calciumf.c @@ -91,6 +91,7 @@ void F_FUNC(cpfin,CPFIN)(long *compo,cal_int *dep,cal_int *err); void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),cal_int *info STR_PLEN(nom)) { + (void)info; // unused parameter /* nom is OUT argument */ cp_cd((void *)*compo,STR_PTR(nom)); /* replace in place ??? */ @@ -278,7 +279,7 @@ void F_FUNC(cplch,CPLCH)(long *compo,cal_int *dep,float *ti,float *tf,cal_int *i for (index = 0; index < *n; index++) { strncpy(&tab[index * STR_LEN(tab)], tabChaine[index], strlen(tabChaine[index])); - if(STR_LEN(tab) > strlen(tabChaine[index])) + if(STR_LEN(tab) > (int)strlen(tabChaine[index])) memset(&tab[index * STR_LEN(tab)+strlen(tabChaine[index])],' ',STR_LEN(tab)-strlen(tabChaine[index])); } } diff --git a/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx b/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx index e5f3fe92f..ef0e5ae05 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx +++ b/src/DSC/DSC_User/Datastream/Calcium/test_DataIdContainer.cxx @@ -130,5 +130,5 @@ int main() { TEST2 test2; TEST3 test3; return !test1.ret+!test2.ret+!test3.ret; -}; +} diff --git a/src/DSC/DSC_User/Datastream/GenericPort.hxx b/src/DSC/DSC_User/Datastream/GenericPort.hxx index aaf6fea6a..5892f7745 100644 --- a/src/DSC/DSC_User/Datastream/GenericPort.hxx +++ b/src/DSC/DSC_User/Datastream/GenericPort.hxx @@ -104,8 +104,8 @@ private: template < typename DataManipulator, typename COUPLING_POLICY > GenericPort::GenericPort() : - cond_instance(& this->storedDatas_mutex),waitingForConvenientDataId(false), - waitingForAnyDataId(false),lastDataIdSet(false) {} + waitingForConvenientDataId(false),waitingForAnyDataId(false),lastDataIdSet(false), + cond_instance(& this->storedDatas_mutex){} template < typename DataManipulator, typename COUPLING_POLICY> GenericPort::~GenericPort() { diff --git a/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx b/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx index f80f6dc0d..5bc8ab833 100644 --- a/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx +++ b/src/DSC/DSC_User/Datastream/Palm/palm_port_factory.cxx @@ -49,7 +49,7 @@ palm_port_factory::create_data_servant(std::string type) { } uses_port * -palm_port_factory::create_data_proxy(std::string type) { +palm_port_factory::create_data_proxy(std::string /*type*/) { uses_port * rtn_port = NULL; return rtn_port; } diff --git a/src/DSC/DSC_User/test_DSC_Exception.cxx b/src/DSC/DSC_User/test_DSC_Exception.cxx index 9526e4764..376cf570c 100644 --- a/src/DSC/DSC_User/test_DSC_Exception.cxx +++ b/src/DSC/DSC_User/test_DSC_Exception.cxx @@ -78,7 +78,7 @@ int main() { a.lanceException1_2(); } // Essai par valeur (ne pas faire çà !) - catch ( A::Exp1 ex ) { + catch ( A::Exp1& ex ) { std::cout << "Exception 1 bien reçue" << std::endl; std::cout << ex.what() << std::endl; } catch ( const DSC_Exception & dscE ) { @@ -126,7 +126,7 @@ int main() { try { a.lanceException1_6(); } - catch ( SALOME_Exception ex ) { + catch ( SALOME_Exception& ex ) { std::cout << "Exception SALOME bien reçue" << std::endl; std::cout << ex.what() << std::endl; } catch ( ...) { diff --git a/src/HDFPersist/HDFarrayClose.c b/src/HDFPersist/HDFarrayClose.c index 583a795c3..c028cd44a 100644 --- a/src/HDFPersist/HDFarrayClose.c +++ b/src/HDFPersist/HDFarrayClose.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFarrayCreate.c b/src/HDFPersist/HDFarrayCreate.c index 3661a4736..ce4c429f9 100644 --- a/src/HDFPersist/HDFarrayCreate.c +++ b/src/HDFPersist/HDFarrayCreate.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFarrayGetDim.c b/src/HDFPersist/HDFarrayGetDim.c index 2bab48942..4af0a7080 100644 --- a/src/HDFPersist/HDFarrayGetDim.c +++ b/src/HDFPersist/HDFarrayGetDim.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFarrayGetType.c b/src/HDFPersist/HDFarrayGetType.c index a7ed3229d..bdd5e7ab7 100644 --- a/src/HDFPersist/HDFarrayGetType.c +++ b/src/HDFPersist/HDFarrayGetType.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFarrayGetTypeId.c b/src/HDFPersist/HDFarrayGetTypeId.c index 69e05764d..68c6e1bb4 100644 --- a/src/HDFPersist/HDFarrayGetTypeId.c +++ b/src/HDFPersist/HDFarrayGetTypeId.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFarrayGetnDim.c b/src/HDFPersist/HDFarrayGetnDim.c index a0a4c6afd..dfe270b41 100644 --- a/src/HDFPersist/HDFarrayGetnDim.c +++ b/src/HDFPersist/HDFarrayGetnDim.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattrClose.c b/src/HDFPersist/HDFattrClose.c index 0e11a7687..b281c80c2 100644 --- a/src/HDFPersist/HDFattrClose.c +++ b/src/HDFPersist/HDFattrClose.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattrCreate.c b/src/HDFPersist/HDFattrCreate.c index d9b788716..bf65c26b0 100644 --- a/src/HDFPersist/HDFattrCreate.c +++ b/src/HDFPersist/HDFattrCreate.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattrGetSize.c b/src/HDFPersist/HDFattrGetSize.c index b2f33ab5c..e387c1d9a 100644 --- a/src/HDFPersist/HDFattrGetSize.c +++ b/src/HDFPersist/HDFattrGetSize.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattrGetType.c b/src/HDFPersist/HDFattrGetType.c index 801ec37a9..d65092d91 100644 --- a/src/HDFPersist/HDFattrGetType.c +++ b/src/HDFPersist/HDFattrGetType.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattrOpen.c b/src/HDFPersist/HDFattrOpen.c index cabcef62d..769568206 100644 --- a/src/HDFPersist/HDFattrOpen.c +++ b/src/HDFPersist/HDFattrOpen.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- File : HDFattrOpen.c diff --git a/src/HDFPersist/HDFattrRead.c b/src/HDFPersist/HDFattrRead.c index 2c8968c1a..3822519f5 100644 --- a/src/HDFPersist/HDFattrRead.c +++ b/src/HDFPersist/HDFattrRead.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattrWrite.c b/src/HDFPersist/HDFattrWrite.c index c80330ecb..0ce47e521 100644 --- a/src/HDFPersist/HDFattrWrite.c +++ b/src/HDFPersist/HDFattrWrite.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFattribute.cc b/src/HDFPersist/HDFattribute.cc index e7f2d3484..f7975a1e0 100644 --- a/src/HDFPersist/HDFattribute.cc +++ b/src/HDFPersist/HDFattribute.cc @@ -98,7 +98,7 @@ hdf_type HDFattribute::GetType() size_t HDFattribute::GetSize() { if(_size == 0) { - if((_size = HDFattrGetSize(_id)) < 0) + if((long)(_size = HDFattrGetSize(_id)) < 0) throw HDFexception("Can't determine the size of data in the attribute"); } return _size; diff --git a/src/HDFPersist/HDFcontainerObject.cc b/src/HDFPersist/HDFcontainerObject.cc index dfbaec5aa..0835f5c01 100644 --- a/src/HDFPersist/HDFcontainerObject.cc +++ b/src/HDFPersist/HDFcontainerObject.cc @@ -52,9 +52,8 @@ int HDFcontainerObject::nInternalObjects() return 0; } -void HDFcontainerObject::InternalObjectIndentify(int /*rank*/, char *object_name) +void HDFcontainerObject::InternalObjectIndentify(int /*rank*/, char* /*object_name*/) { - object_name = NULL; } void HDFcontainerObject::AddSon(HDFinternalObject *son) diff --git a/src/HDFPersist/HDFconvert.cc b/src/HDFPersist/HDFconvert.cc index 3948c5004..b7e3abb41 100644 --- a/src/HDFPersist/HDFconvert.cc +++ b/src/HDFPersist/HDFconvert.cc @@ -86,7 +86,7 @@ int HDFConvert::FromAscii(const std::string& file, const HDFcontainerObject & hd #else // Sort de la compilation -#error Necessite l''utilisation de la primitive mmap +#error "Necessite l'utilisation de la primitive mmap" #endif diff --git a/src/HDFPersist/HDFdataset.cc b/src/HDFPersist/HDFdataset.cc index 56e56dc06..6e4b91fcc 100644 --- a/src/HDFPersist/HDFdataset.cc +++ b/src/HDFPersist/HDFdataset.cc @@ -169,9 +169,9 @@ hdf_size HDFdataset::GetSize() { int size_type; - if (_size == -1) + if ((long)_size == -1) { - if ((_size = HDFdatasetGetSize(_id)) < 0) + if ((long)(_size = HDFdatasetGetSize(_id)) < 0) throw HDFexception("Can't determine the size of the dataset"); if (_type == HDF_NONE) diff --git a/src/HDFPersist/HDFdatasetClose.c b/src/HDFPersist/HDFdatasetClose.c index fa6e57bf1..6ce3dea34 100644 --- a/src/HDFPersist/HDFdatasetClose.c +++ b/src/HDFPersist/HDFdatasetClose.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFdatasetCreate.c b/src/HDFPersist/HDFdatasetCreate.c index 3bb0d5bc7..2e1ce8aa1 100644 --- a/src/HDFPersist/HDFdatasetCreate.c +++ b/src/HDFPersist/HDFdatasetCreate.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) @@ -47,7 +47,7 @@ hdf_idt HDFdatasetCreate(hdf_idt pid,char *name,hdf_type type, { hdf_idt dataset, dataspace = 0; hdf_err ret; - hdf_idt type_hdf, new_type_hdf = -1; + hdf_idt type_hdf = -1, new_type_hdf = -1; switch(type) { diff --git a/src/HDFPersist/HDFdatasetGetDim.c b/src/HDFPersist/HDFdatasetGetDim.c index fb7b5262d..b5fc7d6b5 100644 --- a/src/HDFPersist/HDFdatasetGetDim.c +++ b/src/HDFPersist/HDFdatasetGetDim.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFdatasetGetOrder.c b/src/HDFPersist/HDFdatasetGetOrder.c index 23209fec7..e817d6373 100644 --- a/src/HDFPersist/HDFdatasetGetOrder.c +++ b/src/HDFPersist/HDFdatasetGetOrder.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFdatasetGetSize.c b/src/HDFPersist/HDFdatasetGetSize.c index ec773916e..adc5cbe69 100644 --- a/src/HDFPersist/HDFdatasetGetSize.c +++ b/src/HDFPersist/HDFdatasetGetSize.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) @@ -33,7 +33,7 @@ int HDFdatasetGetSize(hdf_idt id) { hdf_size size; - if ((size = H5Dget_storage_size(id)) < 0) + if ((long)(size = H5Dget_storage_size(id)) < 0) return -1; return (int) size; diff --git a/src/HDFPersist/HDFdatasetGetType.c b/src/HDFPersist/HDFdatasetGetType.c index 65fcd7aef..83e1ddb6d 100644 --- a/src/HDFPersist/HDFdatasetGetType.c +++ b/src/HDFPersist/HDFdatasetGetType.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFdatasetGetnDim.c b/src/HDFPersist/HDFdatasetGetnDim.c index 7c84910d8..146113694 100644 --- a/src/HDFPersist/HDFdatasetGetnDim.c +++ b/src/HDFPersist/HDFdatasetGetnDim.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFdatasetOpen.c b/src/HDFPersist/HDFdatasetOpen.c index 557c6b536..31d9a4467 100644 --- a/src/HDFPersist/HDFdatasetOpen.c +++ b/src/HDFPersist/HDFdatasetOpen.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) diff --git a/src/HDFPersist/HDFdatasetRead.c b/src/HDFPersist/HDFdatasetRead.c index c75032c0b..8809e4316 100644 --- a/src/HDFPersist/HDFdatasetRead.c +++ b/src/HDFPersist/HDFdatasetRead.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) @@ -46,10 +46,10 @@ hdf_err HDFdatasetRead(hdf_idt id, void *val) if ((datatype = H5Dget_type(id)) < 0) return -1; -//#if defined (PCLINUX) || defined (PCLINUX64) +/*#if defined (PCLINUX) || defined (PCLINUX64)*/ if ((H5Tget_class(datatype) == H5T_INTEGER) && (H5Tget_size(datatype) == 4)) datatype = H5T_NATIVE_INT; -//#endif +/*#endif*/ if ((ret = H5Dread(id,datatype,H5S_ALL,H5S_ALL,H5P_DEFAULT, val)) < 0) return -1; diff --git a/src/HDFPersist/HDFdatasetWrite.c b/src/HDFPersist/HDFdatasetWrite.c index 4e8e08131..f9e2e89c6 100644 --- a/src/HDFPersist/HDFdatasetWrite.c +++ b/src/HDFPersist/HDFdatasetWrite.c @@ -1,24 +1,24 @@ -// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE + * + * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, + * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + */ /*---------------------------------------------------------------------------- SALOME HDFPersist : implementation of HDF persitent ( save/ restore ) @@ -44,6 +44,8 @@ hdf_err HDFdatasetWrite(hdf_idt id, void *val) hdf_idt datatype; hdf_err ret; #if defined (PCLINUX) || defined (PCLINUX64) + int i, ndim; + hdf_size *dim; int isI32BE = 0; int size = 0; #endif @@ -56,10 +58,11 @@ hdf_err HDFdatasetWrite(hdf_idt id, void *val) isI32BE = 1; /* See HDFdatasetCreate */ /*SRN : bug IPAL9619: replaced the method of getting the size of INT32 dataset */ - int i, ndim = HDFdatasetGetnDim(id); + + ndim = HDFdatasetGetnDim(id); if(ndim < 0) return -1; - hdf_size *dim = (hdf_size *) malloc(sizeof(hdf_size)*ndim); + dim = (hdf_size *) malloc(sizeof(hdf_size)*ndim); if ((ret = HDFdatasetGetDim(id, dim)) < 0) return -1; for(i=0; igetPID(); + SALOME_UNUSED(pid); // unused in release mode LOG("["<getPID(); + SALOME_UNUSED(pid); // unused in release mode LOG("SALOME launcher PID = " << pid); } catch (const SALOME::SALOME_Exception & ex) { diff --git a/src/Launcher/SALOME_ExternalServerHandler.cxx b/src/Launcher/SALOME_ExternalServerHandler.cxx index 049697f81..bd3163ab6 100644 --- a/src/Launcher/SALOME_ExternalServerHandler.cxx +++ b/src/Launcher/SALOME_ExternalServerHandler.cxx @@ -127,7 +127,7 @@ SALOME::LongVec *SALOME_ExternalServerHandler::listOfChildrenPID() std::vector pids(pyh->evalVL(oss.str())); std::size_t sz(pids.size()); ret->length(sz); - for(auto i=0;i cmd(command_list.length()); - const char *toto(command_list[0]); - for(auto i=0;i<(int)command_list.length();i++) + for(size_t i=0;i loes(ListOfExternalServersCpp(_NS)); std::size_t sz(loes.size()); - ret->length((CORBA::ULong)sz); - for(auto i = 0; i<(int)sz ; i++) //TODO: mismatch signed/unsigned + ret->length(sz); + for(size_t i=0; i ret(new SALOME::ByteVec); - ret->length((CORBA::ULong)size); - for(std::size_t i=0;ilength(size); + for(size_t i=0;i #include -int main(int argc, char** argv) +int main() { std::string xmlfile(""); diff --git a/src/LifeCycleCORBA/TestContainerManager.cxx b/src/LifeCycleCORBA/TestContainerManager.cxx index cb4d08ce1..ac3d5eb0d 100644 --- a/src/LifeCycleCORBA/TestContainerManager.cxx +++ b/src/LifeCycleCORBA/TestContainerManager.cxx @@ -138,7 +138,7 @@ int main (int argc, char * argv[]) int cmax=0; int fmin=10; int fmax=0; - int nbpmax; + int nbpmax=1; for(std::map::iterator iter=cycle.begin();iter!=cycle.end();iter++){ if(strcmp((*iter).first.c_str(),"localhost")!=0){ Engines::ResourceDefinition *p = _ResManager->GetResourceDefinition((*iter).first.c_str()); diff --git a/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i b/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i index 964a9743f..291cf2e20 100644 --- a/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i +++ b/src/LifeCycleCORBA_SWIG/libSALOME_LifeCycleCORBA.i @@ -196,7 +196,7 @@ omniORBpyAPI* api=0; try { $action } - catch (ServiceUnreachable) { + catch (ServiceUnreachable&) { Py_BLOCK_THREADS PyErr_SetString(PyExc_RuntimeError,"Naming Service Unreacheable"); return NULL; diff --git a/src/Logger/SALOME_Trace.cxx b/src/Logger/SALOME_Trace.cxx index 4dedce920..793594fc9 100644 --- a/src/Logger/SALOME_Trace.cxx +++ b/src/Logger/SALOME_Trace.cxx @@ -116,7 +116,7 @@ int SALOME_Trace::Initialize(CORBA::ORB_ptr theOrb) { try { obj = inc->resolve(name); if (!CORBA::is_nil(obj)) m_pInterfaceLogger = SALOME_Logger::Logger::_narrow(obj); - } catch(CosNaming::NamingContext::NotFound) { + } catch(CosNaming::NamingContext::NotFound&) { } catch(...) { } if (!CORBA::is_nil(m_pInterfaceLogger)) { diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index 23eb2dc06..c7b02cff1 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -119,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++){ @@ -217,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++){ @@ -396,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++){ @@ -509,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]; @@ -543,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++){ diff --git a/src/MPIContainer/MPIObject_i.cxx b/src/MPIContainer/MPIObject_i.cxx index ede2f4dd6..f676bdc2d 100644 --- a/src/MPIContainer/MPIObject_i.cxx +++ b/src/MPIContainer/MPIObject_i.cxx @@ -49,7 +49,7 @@ Engines::IORTab* MPIObject_i::tior() for(unsigned int ip=0;iplength();ip++) tior[ip] = (*_tior)[ip]; return tior._retn(); -}; +} void MPIObject_i::tior(const Engines::IORTab& ior) { @@ -153,11 +153,7 @@ void MPIObject_i::remoteMPI2Connect(std::string service) _srv[service] = false; MPI_Barrier(MPI_COMM_WORLD); -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#endif MPI_Info_create(&info); MPI_Info_set(info, "ompi_unique", "true"); if( _numproc == 0 ) @@ -206,11 +202,7 @@ void MPIObject_i::remoteMPI2Connect(std::string service) throw SALOME_Exception(msg.str().c_str()); } } -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#endif /* If rank 0 is server, all processes call MPI_Comm_accept */ /* If rank 0 is not server, all processes call MPI_Comm_connect */ diff --git a/src/MPIContainer/getMPIImplementation.cxx b/src/MPIContainer/getMPIImplementation.cxx index ddf663e2d..cec78696f 100644 --- a/src/MPIContainer/getMPIImplementation.cxx +++ b/src/MPIContainer/getMPIImplementation.cxx @@ -1,6 +1,6 @@ #include -int main(int argc, char** argv) +int main() { #ifdef OPEN_MPI return 1; diff --git a/src/MPIContainer/testMPI2.cxx b/src/MPIContainer/testMPI2.cxx index 163e1fa13..ea7eb1e40 100644 --- a/src/MPIContainer/testMPI2.cxx +++ b/src/MPIContainer/testMPI2.cxx @@ -33,7 +33,8 @@ int main(int argc, char**argv) int *indg; double *vector, sum=0., norm=1., etalon=0.; int rank, size, grank, gsize, rsize; - int vsize=20, lvsize, rlvsize; + int vsize=20, lvsize; + //int rlvsize; int i, k1, k2, imin, imax, nb; int srv=0; MPI_Comm com, icom; @@ -58,11 +59,7 @@ int main(int argc, char**argv) MPI_Comm_rank( MPI_COMM_WORLD, &rank ); MPI_Barrier(MPI_COMM_WORLD); -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); -#endif #ifdef HAVE_MPI2 MPI_Info_create(&info); @@ -109,11 +106,7 @@ int main(int argc, char**argv) exit(1); } } -#if OMPI_MAJOR_VERSION >= 4 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#else - MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL); -#endif MPI_Bcast(&srv,1,MPI_INT,0,MPI_COMM_WORLD); if ( srv ) MPI_Comm_accept( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &icom ); @@ -152,7 +145,7 @@ int main(int argc, char**argv) } for(i=0;iGetPathPrefix("omote"); - MESSAGE("Path prefix pour omote : " << path); + MESSAGE("Path prefix pour omote : " << Superv->GetPathPrefix("omote")); // obtain prefix path for a computer - path =Geom->GetPathPrefix("eri"); - MESSAGE("Path prefix pour eri : " << path); + MESSAGE("Path prefix pour eri : " << Geom->GetPathPrefix("eri")); } catch(SALOME_ModuleCatalog::NotFound &ex){ diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx index be11c2b7f..c4d9b47ed 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx @@ -47,8 +47,8 @@ static int MYDEBUG = 0; SALOME_ModuleCatalog_Handler::SALOME_ModuleCatalog_Handler(ParserPathPrefixes& pathList, ParserComponents& moduleList, ParserTypes& typeMap, - TypeList& typeList):_typeMap(typeMap),_typeList(typeList), - _pathList(pathList),_moduleList(moduleList) + TypeList& typeList):_pathList(pathList),_moduleList(moduleList), + _typeMap(typeMap),_typeList(typeList) { if(MYDEBUG) BEGIN_OF("SALOME_ModuleCatalog_Handler"); diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx index 233f76179..602937cd3 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx @@ -48,9 +48,6 @@ int main(int argc,char **argv) // long TIMESleep = 500000000; int NumberOfTries = 40; -#ifndef WIN32 - int a; -#endif timespec ts_req; ts_req.tv_nsec=TIMESleep; ts_req.tv_sec=0; @@ -75,7 +72,7 @@ int main(int argc,char **argv) { if (i!=1) #ifndef WIN32 - a=nanosleep(&ts_req,&ts_rem); + nanosleep(&ts_req,&ts_rem); #else Sleep(TIMESleep/1000000); #endif @@ -108,13 +105,13 @@ int main(int argc,char **argv) { if (j!=1) #ifndef WIN32 - a=nanosleep(&ts_req, &ts_rem); + nanosleep(&ts_req, &ts_rem); #else Sleep(TIMESleep/1000000); #endif try{ object = inc->resolve(name);} - catch(CosNaming::NamingContext::NotFound) + catch(CosNaming::NamingContext::NotFound&) { INFOS( "Logger Server wasn't found" ); } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index e17fa18d5..326dddc14 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -97,11 +97,11 @@ public: \param pathlist ParserPathPrefixes arguments \param typeMap ParserTypes arguments */ - virtual void _parse_xml_file(const char* file, - ParserComponents & modulelist, - ParserPathPrefixes & pathlist, - ParserTypes& typeMap, - TypeList& typeList); + void _parse_xml_file(const char* file, + ParserComponents & modulelist, + ParserPathPrefixes & pathlist, + ParserTypes& typeMap, + TypeList& typeList); //! method to find component in the parser list /*! @@ -162,7 +162,7 @@ public: \param pathlist ListOfParserPathPrefix arguments \return true if verification is OK */ - virtual bool _verify_path_prefix(ParserPathPrefixes & pathlist); + bool _verify_path_prefix(ParserPathPrefixes & pathlist); // Theses variables will contain the path to the general and personal catalogs char* _general_path; @@ -574,7 +574,7 @@ SALOME_ModuleCatalogImpl::GetTypedComponentList(SALOME_ModuleCatalog::ComponentT _list_typed_component->length(0); // Transform SALOME_ModuleCatalog::ComponentType in ParserComponentType - ParserComponentType _temp_component_type; + ParserComponentType _temp_component_type = OTHER; switch(component_type){ case SALOME_ModuleCatalog::GEOM: _temp_component_type = GEOM ; diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index 9c40b1754..7dc133b02 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -525,7 +525,7 @@ SALOME_NamingService::ResolveComponent(const char* hostname, if ( nbproc >= 1 ) { - char *str_nbproc = new char[8]; + char *str_nbproc = new char[16]; sprintf(str_nbproc, "_%d", nbproc); if( strstr(name.c_str(),str_nbproc) == NULL) continue; // check only containers with _%d in name diff --git a/src/NamingService/Test/NamingServiceTest.cxx b/src/NamingService/Test/NamingServiceTest.cxx index 6a799ee3f..79f168fad 100644 --- a/src/NamingService/Test/NamingServiceTest.cxx +++ b/src/NamingService/Test/NamingServiceTest.cxx @@ -1169,7 +1169,7 @@ void NamingServiceTest::_destroyDirectoryRecurs(std::string path) if (_NS.Change_Directory(path.c_str())) { std::vector subdirs = _NS.list_subdirs(); - for (int i=0; i<(int)subdirs.size(); i++) //TODO: mismatch signed/unsigned + for (size_t i=0; i } -Registry::Components_var Connexion( int argc , char **argv , const char *ptrSessionName ) +Registry::Components_var Connexion( int argc , char **argv , const char */*ptrSessionName*/ ) { Registry::Components_var varComponents = 0 ; - ASSERT(ptrSessionName) ; - ASSERT(strlen(ptrSessionName)>0) ; const char *registryName = "Registry" ; try diff --git a/src/Registry/SALOME_Registry_Server.cxx b/src/Registry/SALOME_Registry_Server.cxx index 25028befa..120aabbfd 100644 --- a/src/Registry/SALOME_Registry_Server.cxx +++ b/src/Registry/SALOME_Registry_Server.cxx @@ -77,9 +77,6 @@ int main( int argc , char **argv ) const char *registryName = "Registry" ; long TIMESleep = 250000000; int NumberOfTries = 40; -#ifndef WIN32 - int a; -#endif timespec ts_req; ts_req.tv_nsec=TIMESleep; ts_req.tv_sec=0; @@ -106,7 +103,7 @@ int main( int argc , char **argv ) { if (i!=1) #ifndef WIN32 - a=nanosleep(&ts_req,&ts_rem); + nanosleep(&ts_req,&ts_rem); #else Sleep(TIMESleep/1000000); #endif @@ -135,7 +132,7 @@ int main( int argc , char **argv ) { if (j!=1) #ifndef WIN32 - a=nanosleep(&ts_req, &ts_rem); + nanosleep(&ts_req, &ts_rem); #else Sleep(TIMESleep/1000000); #endif @@ -143,7 +140,7 @@ int main( int argc , char **argv ) { object = inc->resolve(name); } - catch(CosNaming::NamingContext::NotFound) + catch(CosNaming::NamingContext::NotFound&) { MESSAGE( "Registry Server: Logger Server wasn't found" ); } diff --git a/src/ResourcesManager/ResourcesManager.hxx b/src/ResourcesManager/ResourcesManager.hxx index 94f337041..2a6baca26 100644 --- a/src/ResourcesManager/ResourcesManager.hxx +++ b/src/ResourcesManager/ResourcesManager.hxx @@ -72,12 +72,12 @@ class RESOURCESMANAGER_EXPORT ResourcesManager_cpp public: ResourcesManager_cpp(const char *xmlFilePath); - ResourcesManager_cpp() ; + ResourcesManager_cpp(); ~ResourcesManager_cpp(); std::vector - GetFittingResources(const resourceParams& params) ; + GetFittingResources(const resourceParams& params); std::string Find(const std::string& policy, const std::vector& listOfResources) const; diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx index 5a503e8b9..fb8d0e970 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx @@ -132,9 +132,9 @@ void ResourceDataToSort::Print() const ParserResourcesType::ParserResourcesType() -: type(single_machine), - Protocol(ssh), +: Protocol(ssh), ClusterInternalProtocol(ssh), + type(single_machine), Batch(none), mpi(nompi), nbOfProc(1), diff --git a/src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx index 1e55c0083..bc88292a2 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeParameter_i.cxx @@ -30,7 +30,7 @@ #include #include "Utils_ExceptHandlers.hxx" -UNEXPECT_CATCH(AP_InvalidIdentifier, SALOMEDS::AttributeParameter::InvalidIdentifier); +UNEXPECT_CATCH(AP_InvalidIdentifier, SALOMEDS::AttributeParameter::InvalidIdentifier) //======================================================================= /*! diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx index e690fdd6c..c561f7cb9 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfInteger_i.cxx @@ -43,9 +43,9 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeSequenceOfInteger_i::CorbaSequence() SALOMEDS::Locker lock; SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; const std::vector& CasCadeSeq = dynamic_cast(_impl)->Array(); - int len = (int)CasCadeSeq.size(); //!< TODO: conversion from size_t to int + size_t len = CasCadeSeq.size(); CorbaSeq->length(len); - for (int i = 0; i < len; i++) { + for (size_t i = 0; i < len; i++) { CorbaSeq[i] = CasCadeSeq[i]; } return CorbaSeq._retn(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx index 1aefe2e76..1883c0a96 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeSequenceOfReal_i.cxx @@ -32,11 +32,9 @@ void SALOMEDS_AttributeSequenceOfReal_i::Assign(const SALOMEDS::DoubleSeq& other { SALOMEDS::Locker lock; CheckLocked(); - std::vector CasCadeSeq; - for (size_t i = 0; i < other.length(); i++) { - CasCadeSeq.push_back(other[(CORBA::ULong)i]); //!< TODO: conversion from size_t to CORBA::ULong - } - dynamic_cast(_impl)->Assign(CasCadeSeq); + std::vector aSeq; + for(int i = 0, len = other.length(); i(_impl)->Assign(aSeq); } SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence() @@ -44,9 +42,9 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence() SALOMEDS::Locker lock; SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; const std::vector& CasCadeSeq = dynamic_cast(_impl)->Array(); - int len = (int)CasCadeSeq.size(); //!< TODO: conversion from size_t to int + size_t len = CasCadeSeq.size(); CorbaSeq->length(len); - for (int i = 0; i < len; i++) { + for (size_t i = 0; i < len; i++) { CorbaSeq[i] = CasCadeSeq[i]; } return CorbaSeq._retn(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx index 1e1c69c0e..cb18c57b8 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfInteger_i.cxx @@ -34,8 +34,8 @@ #include #include -UNEXPECT_CATCH(ATI_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex); -UNEXPECT_CATCH(ATI_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength); +UNEXPECT_CATCH(ATI_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex) +UNEXPECT_CATCH(ATI_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength) void SALOMEDS_AttributeTableOfInteger_i::SetTitle(const char* theTitle) { @@ -80,7 +80,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetRowTitles(const SALOMEDS::StringSeq& Unexpect aCatch (ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theTitles.length(); i++) { SetRowTitle(i + 1, theTitles[i]); } @@ -125,7 +125,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitles(const SALOMEDS::StringS Unexpect aCatch(ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in()); } @@ -170,7 +170,7 @@ void SALOMEDS_AttributeTableOfInteger_i::SetRowUnits(const SALOMEDS::StringSeq& Unexpect aCatch (ATI_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast(_impl); - if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theUnits.length(); i++) { aTable->SetRowUnit(i + 1, (char*)theUnits[i].in()); } @@ -243,7 +243,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetRow(CORBA::Long theRow SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; std::vector aRow = aTable->GetRowData(theRow); CorbaSeq->length((CORBA::ULong)aRow.size()); //!< TODO: conversion from size_t to CORBA::ULong - for (int i = 0; i < aRow.size(); i++) { + for (int i = 0; i < (int)aRow.size(); i++) { CorbaSeq[i] = aRow[i]; } return CorbaSeq._retn(); @@ -293,7 +293,7 @@ SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::GetColumn(CORBA::Long the SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq; std::vector aColumn = aTable->GetColumnData(theColumn); CorbaSeq->length((CORBA::ULong)aColumn.size()); //!< TODO: conversion from size_t to CORBA::ULong - for (int i = 0; i < aColumn.size(); i++) { + for (int i = 0; i < (int)aColumn.size(); i++) { CorbaSeq[i] = aColumn[i]; } return CorbaSeq._retn(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx index 10ed9bf65..7ba666280 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfReal_i.cxx @@ -32,8 +32,8 @@ #include #include "Utils_ExceptHandlers.hxx" -UNEXPECT_CATCH(ATR_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex); -UNEXPECT_CATCH(ATR_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength); +UNEXPECT_CATCH(ATR_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex) +UNEXPECT_CATCH(ATR_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength) void SALOMEDS_AttributeTableOfReal_i::SetTitle(const char* theTitle) { @@ -79,7 +79,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetRowTitles(const SALOMEDS::StringSeq& th Unexpect aCatch (ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetRowTitle(i + 1, (char*)theTitles[i].in()); } @@ -124,7 +124,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetColumnTitles(const SALOMEDS::StringSeq& Unexpect aCatch(ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in()); } @@ -169,7 +169,7 @@ void SALOMEDS_AttributeTableOfReal_i::SetRowUnits(const SALOMEDS::StringSeq& the Unexpect aCatch (ATR_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast(_impl); - if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theUnits.length(); i++) { aTable->SetRowUnit(i + 1, (char*)theUnits[i].in()); } @@ -233,7 +233,7 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetRow(CORBA::Long theRow) SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; std::vector aRow = aTable->GetRowData(theRow); CorbaSeq->length((CORBA::ULong)aRow.size()); //!< TODO: conversion from size_t to CORBA::ULong - for (int i = 0; i < aRow.size(); i++) { + for (int i = 0; i < (int)aRow.size(); i++) { CorbaSeq[i] = aRow[i]; } return CorbaSeq._retn(); @@ -273,7 +273,7 @@ SALOMEDS::DoubleSeq* SALOMEDS_AttributeTableOfReal_i::GetColumn(CORBA::Long theC SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq; std::vector aColumn = aTable->GetColumnData(theColumn); CorbaSeq->length((CORBA::ULong)aColumn.size()); //!< TODO: conversion from size_t to CORBA::ULong - for (int i = 0; i < aColumn.size(); i++) { + for (int i = 0; i < (int)aColumn.size(); i++) { CorbaSeq[i] = aColumn[i]; } return CorbaSeq._retn(); diff --git a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx index 8b3748d6e..73f01d9d5 100644 --- a/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx +++ b/src/SALOMEDS/SALOMEDS_AttributeTableOfString_i.cxx @@ -81,7 +81,7 @@ void SALOMEDS_AttributeTableOfString_i::SetRowTitles(const SALOMEDS::StringSeq& Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetRowTitle(i + 1, std::string((char*)theTitles[i].in())); } @@ -125,7 +125,7 @@ void SALOMEDS_AttributeTableOfString_i::SetColumnTitles(const SALOMEDS::StringSe Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theTitles.length(); i++) { aTable->SetColumnTitle(i + 1, std::string((char*)theTitles[i].in())); } @@ -170,7 +170,7 @@ void SALOMEDS_AttributeTableOfString_i::SetRowUnits(const SALOMEDS::StringSeq& t Unexpect aCatch(ATS_IncorrectArgumentLength); CheckLocked(); SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast(_impl); - if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); + if ((int)theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength(); for (int i = 0; i < (int)theUnits.length(); i++) { aTable->SetRowUnit(i + 1, std::string((char*)theUnits[i].in())); } diff --git a/src/SALOMEDS/SALOMEDS_Client.cxx b/src/SALOMEDS/SALOMEDS_Client.cxx index 12810eded..da474e7e6 100644 --- a/src/SALOMEDS/SALOMEDS_Client.cxx +++ b/src/SALOMEDS/SALOMEDS_Client.cxx @@ -71,6 +71,7 @@ static void DumpStudy() { MESSAGE("Explore Study and Write name of each object if it exists"); char* name; + SALOME_UNUSED(name); // unused in release mode SALOMEDS::SComponentIterator_var itcomp = KERNEL::getStudyServant()->NewComponentIterator(); int offset = 1; for (; itcomp->More(); itcomp->Next()) { @@ -90,6 +91,7 @@ static void Test() { try { char* name; + SALOME_UNUSED(name); // unused in release mode SALOMEDS::Study_var myStudy = KERNEL::getStudyServant(); diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.hxx b/src/SALOMEDS/SALOMEDS_Driver_i.hxx index ad382c393..28dc9e3dc 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.hxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.hxx @@ -117,7 +117,7 @@ public: SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB); - ~SALOMEDS_DriverFactory_i(); + virtual ~SALOMEDS_DriverFactory_i(); virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType); diff --git a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx index a9a812a26..8092bd4cb 100644 --- a/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx +++ b/src/SALOMEDS/SALOMEDS_GenericAttribute_i.cxx @@ -130,6 +130,7 @@ SALOMEDS::GenericAttribute_ptr SALOMEDS_GenericAttribute_i::CreateAttribute char* aTypeOfAttribute = (char*)aClassType.c_str(); SALOMEDS::GenericAttribute_var anAttribute; SALOMEDS_GenericAttribute_i* attr_servant = NULL; + SALOME_UNUSED(attr_servant); __CreateGenericCORBAAttribute return anAttribute._retn(); diff --git a/src/SALOMEDS/SALOMEDS_Server.cxx b/src/SALOMEDS/SALOMEDS_Server.cxx index 4ca60c3db..242cab5be 100644 --- a/src/SALOMEDS/SALOMEDS_Server.cxx +++ b/src/SALOMEDS/SALOMEDS_Server.cxx @@ -63,7 +63,6 @@ int main(int argc, char** argv) // Obtain a reference to the root POA. long TIMESleep = 500000000; int NumberOfTries = 40; - int a; timespec ts_req; ts_req.tv_nsec=TIMESleep; ts_req.tv_sec=0; @@ -89,9 +88,9 @@ int main(int argc, char** argv) { if (i!=1) #ifndef WIN32 - a=nanosleep(&ts_req,&ts_rem); + nanosleep(&ts_req,&ts_rem); #else - Sleep(TIMESleep/1000000); + Sleep(TIMESleep/1000000); #endif try { @@ -129,7 +128,7 @@ int main(int argc, char** argv) { if (j!=1) #ifndef WIN32 - a=nanosleep(&ts_req, &ts_rem); + nanosleep(&ts_req, &ts_rem); #else Sleep(TIMESleep/1000000); #endif @@ -137,7 +136,7 @@ int main(int argc, char** argv) { object = inc->resolve(name); } - catch(CosNaming::NamingContext::NotFound) + catch(CosNaming::NamingContext::NotFound&) { MESSAGE( "SalomeDS Server: Logger Server wasn't found" ); } diff --git a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx index f8835e719..45e3ef916 100644 --- a/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_StudyBuilder_i.cxx @@ -229,7 +229,7 @@ void SALOMEDS_StudyBuilder_i::LoadWith(SALOMEDS::SComponent_ptr anSCO, * Purpose : */ //============================================================================ -void SALOMEDS_StudyBuilder_i::Load(SALOMEDS::SObject_ptr sco) +void SALOMEDS_StudyBuilder_i::Load(SALOMEDS::SObject_ptr /*sco*/) { MESSAGE ( "This function is not yet implemented"); } diff --git a/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx index 93a563981..7f48a7e02 100644 --- a/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx +++ b/src/SALOMEDS/SALOMEDS_TMPFile_i.cxx @@ -51,7 +51,7 @@ SALOMEDS_TMPFile_i if(!&myStream.in()) throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - !&myStream.in()"); - if(theIndex < 0 || theIndex >= myStream->length()) + if(theIndex >= myStream->length()) throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()"); return myStream[(CORBA::ULong)theIndex]; //!< TODO: conversion from size_t to CORBA::ULong @@ -81,7 +81,7 @@ Engines_TMPFile_i if(!&myStream.in()) throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - !&myStream.in()"); - if(theIndex < 0 || theIndex >= myStream->length()) + if(theIndex >= myStream->length()) throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()"); return myStream[(CORBA::ULong)theIndex]; //!< TODO: conversion from size_t to _CROBA_ULong diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx index d84a59bd9..72c36ceef 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeStudyProperties.cxx @@ -499,11 +499,11 @@ void SALOMEDSImpl_AttributeStudyProperties::Load(const std::string& value) aVersions[verSize] = 0; std::string mVersions = aVersions; - int start = 0, idx = (int)mVersions.find( ';', start ); //!< TODO: conversion from size_t to int + size_t start = 0, idx = mVersions.find( ';', start ); while ( idx != std::string::npos ) { SetComponentVersion( aModule, mVersions.substr( start, idx-start ) ); start = idx + 1; - idx = (int)mVersions.find( ';', start ); //!< TODO: conversion from size_t to int + idx = mVersions.find( ';', start ); } SetComponentVersion( aModule, mVersions.substr( start ) ); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx index 3524e180d..b8b71859c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx @@ -232,9 +232,9 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnData(const int theColumn, myTable[myNbColumns*((int)i-1)+theColumn] = theData[i-1]; //!< TODO: conversion from size_t to int } - if(aLength > myNbRows) { + if((int)aLength > myNbRows) { myNbRows = (int)aLength; //!< TODO: conversion from size_t to int - while (myRows.size() < myNbRows) { // append empty row titles + while ((int)myRows.size() < myNbRows) { // append empty row titles myRows.push_back(std::string("")); } } @@ -263,7 +263,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitle(const int theColumn, { CheckLocked(); Backup(); - while(myCols.size() < theColumn) myCols.push_back(std::string("")); + while((int)myCols.size() < theColumn) myCols.push_back(std::string("")); myCols[theColumn-1] = theTitle; SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved @@ -272,13 +272,13 @@ void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitle(const int theColumn, std::string SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitle(const int theColumn) const { if(myCols.empty()) return ""; - if(myCols.size() < theColumn) return ""; + if((int)myCols.size() < theColumn) return ""; return myCols[theColumn-1]; } void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitles(const std::vector& theTitles) { - if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); + if ((int)theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); size_t aLength = theTitles.size(), i; for(i = 0; i < aLength; i++) myCols[i] = theTitles[i]; @@ -315,7 +315,7 @@ void SALOMEDSImpl_AttributeTableOfInteger::PutValue(const int theValue, myTable[anIndex] = theValue; if(theRow > myNbRows) { - while (myRows.size() < theRow) { // append empty row titles + while ((int)myRows.size() < theRow) { // append empty row titles myRows.push_back(std::string("")); } myNbRows = theRow; @@ -442,11 +442,11 @@ std::string SALOMEDSImpl_AttributeTableOfInteger::Save() { std::string aString; char* buffer = new char[1024]; - size_t i, j, l; + int i, j, l; //Title - l = myTitle.size(); - sprintf(buffer, "%u\n", l); + l = (int)myTitle.size(); + sprintf(buffer, "%d\n", l); aString+=buffer; for(i=0; ifirst, p->second); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx index df3ef7040..857f2d950 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx @@ -89,7 +89,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetNbColumns(const int theNbColumns) myNbColumns = theNbColumns; - while (myCols.size() < myNbColumns) { // append empty columns titles + while ((int)myCols.size() < myNbColumns) { // append empty columns titles myCols.push_back(std::string("")); } @@ -114,11 +114,11 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowData(const int theRow, const std::vector& theData) { CheckLocked(); - if(theData.size() > myNbColumns) SetNbColumns((int)theData.size()); //!< TODO: conversion from size_t to const int, possible loss of data + if((int)theData.size() > myNbColumns) SetNbColumns((int)theData.size()); //!< TODO: conversion from size_t to const int, possible loss of data Backup(); - while (myRows.size() < theRow) { // append new row titles + while ((int)myRows.size() < theRow) { // append new row titles myRows.push_back(std::string("")); } @@ -177,7 +177,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetRowUnit(const int theRow, void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const std::vector& theUnits) { - if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); + if ((int)theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); size_t aLength = theUnits.size(), i; for(i = 1; i <= aLength; i++) SetRowUnit((int)i, theUnits[i-1]); //!< TODO: conversion from size_t to int @@ -194,7 +194,7 @@ std::vector SALOMEDSImpl_AttributeTableOfReal::GetRowUnits() void SALOMEDSImpl_AttributeTableOfReal::SetRowTitles(const std::vector& theTitles) { - if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); + if ((int)theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); size_t aLength = theTitles.size(), i; for(i = 1; i <= aLength; i++) SetRowTitle((int)i, theTitles[i-1]); //!< TODO: conversion from size_t to int @@ -233,9 +233,9 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnData(const int theColumn, myTable[myNbColumns*((int)i-1)+theColumn] = theData[i-1]; //!< TODO: conversion from size_t to int } - if(aLength > myNbRows) { + if((int)aLength > myNbRows) { myNbRows = (int)aLength; //!< TODO: conversion from size_t to int - while (myRows.size() < myNbRows) { // append empty row titles + while ((int)myRows.size() < myNbRows) { // append empty row titles myRows.push_back(std::string("")); } } @@ -264,7 +264,7 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitle(const int theColumn, { CheckLocked(); Backup(); - while(myCols.size() < theColumn) myCols.push_back(std::string("")); + while((int)myCols.size() < theColumn) myCols.push_back(std::string("")); myCols[theColumn-1] = theTitle; SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved @@ -273,13 +273,13 @@ void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitle(const int theColumn, std::string SALOMEDSImpl_AttributeTableOfReal::GetColumnTitle(const int theColumn) const { if(myCols.empty()) return ""; - if(myCols.size() < theColumn) return ""; + if((int)myCols.size() < theColumn) return ""; return myCols[theColumn-1]; } void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitles(const std::vector& theTitles) { - if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); + if ((int)theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); size_t aLength = theTitles.size(), i; for(i = 0; i < aLength; i++) myCols[i] = theTitles[i]; @@ -316,7 +316,7 @@ void SALOMEDSImpl_AttributeTableOfReal::PutValue(const double& theValue, myTable[anIndex] = theValue; if(theRow > myNbRows) { - while (myRows.size() < theRow) { // append empty row titles + while ((int)myRows.size() < theRow) { // append empty row titles myRows.push_back(std::string("")); } myNbRows = theRow; @@ -443,11 +443,11 @@ std::string SALOMEDSImpl_AttributeTableOfReal::Save() { std::string aString; char* buffer = new char[1024]; - size_t i, j, l; + int i, j, l; //Title - l = myTitle.size(); - sprintf(buffer, "%zu\n", l); + l = (int)myTitle.size(); + sprintf(buffer, "%d\n", l); aString+=buffer; for(i=0; ifirst, p->second); @@ -586,12 +586,12 @@ std::vector SALOMEDSImpl_AttributeTableOfReal::SortRow(const int theRow, So } result = indices; - for ( int col = 0; col < indices.size(); col++ ) { + for ( int col = 0; col < (int)indices.size(); col++ ) { int idx = indices[col]; if ( col+1 == idx ) continue; SwapCells(theRow, col+1, theRow, idx); int idx1 = 0; - for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++) if ( indices[i] == col+1 ) idx1 = i; indices[idx1] = idx; } @@ -626,12 +626,12 @@ std::vector SALOMEDSImpl_AttributeTableOfReal::SortColumn(const int theColu } result = indices; - for ( int row = 0; row < indices.size(); row++ ) { + for ( int row = 0; row < (int)indices.size(); row++ ) { int idx = indices[row]; if ( row+1 == idx ) continue; SwapCells(row+1, theColumn, idx, theColumn); int idx1 = 0; - for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++) if ( indices[i] == row+1 ) idx1 = i; indices[idx1] = idx; } @@ -666,12 +666,12 @@ std::vector SALOMEDSImpl_AttributeTableOfReal::SortByRow(const int theRow, } result = indices; - for ( int col = 0; col < indices.size(); col++ ) { + for ( int col = 0; col < (int)indices.size(); col++ ) { int idx = indices[col]; if ( col+1 == idx ) continue; SwapColumns(col+1, idx); int idx1 = 0; - for ( int i = col+1; i < indices.size() && idx1 == 0; i++) + for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++) if ( indices[i] == col+1 ) idx1 = i; indices[idx1] = idx; } @@ -706,12 +706,12 @@ std::vector SALOMEDSImpl_AttributeTableOfReal::SortByColumn(const int theCo } result = indices; - for ( int row = 0; row < indices.size(); row++ ) { + for ( int row = 0; row < (int)indices.size(); row++ ) { int idx = indices[row]; if ( row+1 == idx ) continue; SwapRows(row+1, idx); int idx1 = 0; - for ( int i = row+1; i < indices.size() && idx1 == 0; i++) + for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++) if ( indices[i] == row+1 ) idx1 = i; indices[idx1] = idx; } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx index 892470dbc..00715fe41 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx @@ -89,7 +89,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetNbColumns(const int theNbColumns) myNbColumns = theNbColumns; - while (myCols.size() < myNbColumns) { // append empty columns titles + while ((int)myCols.size() < myNbColumns) { // append empty columns titles myCols.push_back(std::string("")); } @@ -127,7 +127,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowUnit(const int theRow, void SALOMEDSImpl_AttributeTableOfString::SetRowUnits(const std::vector& theUnits) { - if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); + if ((int)theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); size_t aLength = theUnits.size(), i; for(i = 1; i <= aLength; i++) SetRowUnit((int)i, theUnits[i-1]); //!< TODO: conversion from size_t to int } @@ -142,7 +142,7 @@ std::vector SALOMEDSImpl_AttributeTableOfString::GetRowUnits() void SALOMEDSImpl_AttributeTableOfString::SetRowTitles(const std::vector& theTitles) { - if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); + if ((int)theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); size_t aLength = theTitles.size(), i; for(i = 1; i <= aLength; i++) SetRowTitle((int)i, theTitles[i-1]); //!< TODO: conversion from size_t to int @@ -171,11 +171,11 @@ void SALOMEDSImpl_AttributeTableOfString::SetRowData(const int theRow, const std::vector& theData) { CheckLocked(); - if(theData.size() > myNbColumns) SetNbColumns((int)theData.size()); //!< TODO: conversion from size_t to const int, possible loss of data + if((int)theData.size() > myNbColumns) SetNbColumns((int)theData.size()); //!< TODO: conversion from size_t to const int, possible loss of data Backup(); - while (myRows.size() < theRow) { // append new row titles + while ((int)myRows.size() < theRow) { // append new row titles myRows.push_back(std::string("")); } @@ -230,9 +230,9 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnData(const int theColumn, myTable[myNbColumns*((int)i-1)+theColumn] = theData[i-1]; //!< TODO: conversion from size_t to int } - if(aLength > myNbRows) { + if((int)aLength > myNbRows) { myNbRows = (int)aLength; //!< TODO: conversion from size_t to int - while (myRows.size() < myNbRows) { // append empty row titles + while ((int)myRows.size() < myNbRows) { // append empty row titles myRows.push_back(std::string("")); } } @@ -261,7 +261,7 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnTitle(const int theColumn, { CheckLocked(); Backup(); - while(myCols.size() < theColumn) myCols.push_back(std::string("")); + while((int)myCols.size() < theColumn) myCols.push_back(std::string("")); myCols[theColumn-1] = theTitle; SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved @@ -270,13 +270,13 @@ void SALOMEDSImpl_AttributeTableOfString::SetColumnTitle(const int theColumn, std::string SALOMEDSImpl_AttributeTableOfString::GetColumnTitle(const int theColumn) const { if(myCols.empty()) return ""; - if(myCols.size() < theColumn) return ""; + if((int)myCols.size() < theColumn) return ""; return myCols[theColumn-1]; } void SALOMEDSImpl_AttributeTableOfString::SetColumnTitles(const std::vector& theTitles) { - if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); + if ((int)theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns"); size_t aLength = theTitles.size(), i; for(i = 0; i < aLength; i++) myCols[i] = theTitles[i]; @@ -313,7 +313,7 @@ void SALOMEDSImpl_AttributeTableOfString::PutValue(const std::string& theValue, myTable[anIndex] = theValue; if(theRow > myNbRows) { - while (myRows.size() < theRow) { // append empty row titles + while ((int)myRows.size() < theRow) { // append empty row titles myRows.push_back(std::string("")); } myNbRows = theRow; @@ -439,11 +439,11 @@ std::string SALOMEDSImpl_AttributeTableOfString::Save() { std::string aString; char* buffer = new char[1024]; - size_t i, j, l; + int i, j, l; //Title - l = myTitle.size(); - sprintf(buffer, "%Iu\n", l); + l = (int)myTitle.size(); + sprintf(buffer, "%d\n", l); aString+=buffer; for(i=0; isecond.size()) { // check empty string in the value table diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx index fb2594f5a..4c40244ab 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Callback.hxx @@ -36,6 +36,7 @@ private: SALOMEDSImpl_UseCaseBuilder* _builder; public: + virtual ~SALOMEDSImpl_Callback() {} SALOMEDSImpl_Callback(SALOMEDSImpl_UseCaseBuilder* builder) { @@ -57,6 +58,7 @@ public: class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AbstractCallback { public: + virtual ~SALOMEDSImpl_AbstractCallback() {} virtual bool addSO_Notification(const SALOMEDSImpl_SObject& /*theSObject*/){return false;} virtual bool removeSO_Notification(const SALOMEDSImpl_SObject& /*theSObject*/){return false;} virtual bool modifySO_Notification(const SALOMEDSImpl_SObject& /*theSObject*/, int /*reason*/ ){return false;} diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx index 3dc0bf387..804d2f053 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_ChildIterator.hxx @@ -43,7 +43,7 @@ public: SALOMEDSImpl_ChildIterator() {} SALOMEDSImpl_ChildIterator(const SALOMEDSImpl_SObject& theSO); SALOMEDSImpl_ChildIterator(const DF_Label& theLabel); - ~SALOMEDSImpl_ChildIterator() {}; + virtual ~SALOMEDSImpl_ChildIterator() {}; virtual void Init(); virtual void Init(const DF_Label& theLabel); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx index 8cfc21621..b84fa1192 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_GenericVariable.cxx @@ -142,6 +142,6 @@ std::string SALOMEDSImpl_GenericVariable::SaveType() const * Purpose : */ //============================================================================ -void SALOMEDSImpl_GenericVariable::Load(const std::string& theStrValue) +void SALOMEDSImpl_GenericVariable::Load(const std::string& /*theStrValue*/) { } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx index 6992d5fcd..b8fe3f773 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_IParameters.cxx @@ -87,7 +87,7 @@ std::string SALOMEDSImpl_IParameters::getValue(const std::string& listName, int if(!_ap) return ""; if(!_ap->IsSet(listName, PT_STRARRAY)) return ""; std::vector v = _ap->GetStrArray(listName); - if(index >= v.size()) return ""; + if(index >= (int)v.size()) return ""; return v[index]; } @@ -119,7 +119,7 @@ std::string SALOMEDSImpl_IParameters::getParameter(const std::string& entry, con if(!_ap->IsSet(entry, PT_STRARRAY)) return ""; std::vector v = _ap->GetStrArray(entry); size_t length = v.size(); - for(int i = 0; iIsSet(entry, PT_STRARRAY)) return ""; std::vector v = _ap->GetStrArray(entry); size_t length = v.size(); - for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterNames(const st if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); size_t length = v.size(); - for(int i = 0; i SALOMEDSImpl_IParameters::getAllParameterValues(const s if(!_ap->IsSet(entry, PT_STRARRAY)) return v; v = _ap->GetStrArray(entry); size_t length = v.size(); - for(int i = 1; i lst = ip.getValues(v[i]); dump += "# fill list "+v[i]+"\n"; for(int j = 0; j < (int)lst.size(); j++) { //TODO: mismatch signed/unsigned - if (lst[j].find('\"') == -1) //TODO: std::string::npos + if (lst[j].find('\"') == std::string::npos) dump += "ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n"; else dump += "ipar.append(\""+v[i]+"\", \"\"\""+lst[j]+"\"\"\")\n"; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx index 6c6be3a0b..89c3ccbd9 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponent.cxx @@ -43,6 +43,7 @@ SALOMEDSImpl_SComponent::SALOMEDSImpl_SComponent() */ //============================================================================ SALOMEDSImpl_SComponent::SALOMEDSImpl_SComponent(const SALOMEDSImpl_SComponent& theSCO) +: SALOMEDSImpl_SObject() { _lab = theSCO._lab; _value = theSCO._value; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx index b6d4ff794..9d85ce653 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_SComponentIterator.hxx @@ -56,7 +56,7 @@ public: SALOMEDSImpl_SComponentIterator(DF_Document* theDocument); - ~SALOMEDSImpl_SComponentIterator() {}; + virtual ~SALOMEDSImpl_SComponentIterator() {}; virtual void Init(); virtual bool More(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx index c03b98786..ef4dc85fe 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_Study.cxx @@ -373,7 +373,7 @@ bool SALOMEDSImpl_Study::Impl_SaveProperties(HDFgroup *hdf_group) int aLength = 0, aLength1 = 0, anIndex, i, unitsSize = 0, commentSize = 0; - for(i=1; i<=aNames.size(); i++) + for(i=1; i<=(int)aNames.size(); i++) aLength += (int)aNames[i-1].size() + 1; //!< TODO: conversion from size_t to int std::map< std::string, std::vector >::const_iterator it; @@ -678,7 +678,7 @@ bool SALOMEDSImpl_Study::Impl_SaveAs(const std::string& aStudyUrl, std::string varType; std::string varIndex; - for (int i=0 ;i < myNoteBookVars.size(); i++ ) { + for (int i=0 ;i < (int)myNoteBookVars.size(); i++ ) { // For each variable create HDF group hdf_notebook_var = new HDFgroup((char*)myNoteBookVars[i]->Name().c_str(),hdf_notebook_vars); hdf_notebook_var->CreateOnDisk(); @@ -1819,7 +1819,7 @@ std::string SALOMEDSImpl_Study::_GetStudyVariablesScript() std::string set_method = _GetNoteBookAccessor()+".set("; std::string varName; std::string varValue; - for(int i = 0 ; i < myNoteBookVars.size();i++ ) { + for(int i = 0 ; i < (int)myNoteBookVars.size();i++ ) { varName = myNoteBookVars[i]->Name(); varValue = myNoteBookVars[i]->SaveToScript(); dump+=set_method+"\""+varName+"\", "+varValue+")\n"; @@ -2385,7 +2385,7 @@ void dumpSO(const SALOMEDSImpl_SObject& theSO, std::string aTab(Tab), anID(theSO.GetID()); fp << aTab << anID << std::endl; std::vector attribs = theSO.GetLabel().GetAttributes(); - for(int i = 0; i(attribs[i]); if(!anAttr) { @@ -2621,7 +2621,7 @@ void SALOMEDSImpl_Study::SetStringVariable(const std::string& theVarName, //============================================================================ void SALOMEDSImpl_Study::SetStringVariableAsDouble(const std::string& theVarName, const double theValue, - const SALOMEDSImpl_GenericVariable::VariableTypes theType) + const SALOMEDSImpl_GenericVariable::VariableTypes /*theType*/) { SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName); if(SALOMEDSImpl_ScalarVariable* aSVar = dynamic_cast(aGVar)) @@ -2697,7 +2697,7 @@ std::vector SALOMEDSImpl_Study::GetVariableNames() const { std::vector aResult; - for(int i = 0; i < myNoteBookVars.size(); i++) + for(int i = 0; i < (int)myNoteBookVars.size(); i++) aResult.push_back(myNoteBookVars[i]->Name()); return aResult; @@ -2721,7 +2721,7 @@ void SALOMEDSImpl_Study::AddVariable(SALOMEDSImpl_GenericVariable* theVariable) SALOMEDSImpl_GenericVariable* SALOMEDSImpl_Study::GetVariable(const std::string& theName) const { SALOMEDSImpl_GenericVariable* aResult = NULL; - for(int i = 0; i < myNoteBookVars.size();i++) { + for(int i = 0; i < (int)myNoteBookVars.size();i++) { if(theName.compare(myNoteBookVars[i]->Name()) == 0) { aResult = myNoteBookVars[i]; break; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx index ab230e03a..a7ee58adc 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_StudyBuilder.hxx @@ -51,7 +51,7 @@ public: SALOMEDSImpl_StudyBuilder(const SALOMEDSImpl_Study* theOwner); - ~SALOMEDSImpl_StudyBuilder(); + virtual ~SALOMEDSImpl_StudyBuilder(); virtual SALOMEDSImpl_SComponent NewComponent(const std::string& ComponentDataType); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx index 7757d35e0..38ad83613 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_TMPFile.hxx @@ -32,6 +32,8 @@ struct SALOMEDSIMPL_EXPORT SALOMEDSImpl_TMPFile typedef unsigned char TOctet; //typedef unsigned int size_t; + virtual ~SALOMEDSImpl_TMPFile() {} + virtual size_t Size() = 0; virtual TOctet* Data(); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx index 22b9b372a..72e2216ff 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseBuilder.hxx @@ -53,7 +53,7 @@ public: SALOMEDSImpl_UseCaseBuilder(DF_Document* theDocument); //! standard destructor - ~SALOMEDSImpl_UseCaseBuilder(); + virtual ~SALOMEDSImpl_UseCaseBuilder(); virtual bool Append(const SALOMEDSImpl_SObject& theObject); diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx index 8f6247c3d..cade5ce71 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_UseCaseIterator.hxx @@ -54,7 +54,7 @@ public: const bool allLevels); //! standard destructor - ~SALOMEDSImpl_UseCaseIterator(); + virtual ~SALOMEDSImpl_UseCaseIterator(); virtual void Init(bool); virtual bool More(); diff --git a/src/SALOMEDSImpl/testDS.cxx b/src/SALOMEDSImpl/testDS.cxx index 1fbc0993d..d71fd5e69 100644 --- a/src/SALOMEDSImpl/testDS.cxx +++ b/src/SALOMEDSImpl/testDS.cxx @@ -44,7 +44,7 @@ //#include "SALOMEDSImpl_.hxx" -int main (int argc, char * argv[]) +int main () { std::cout << "Test started " << std::endl; diff --git a/src/SALOMELocalTrace/FileTraceCollector.cxx b/src/SALOMELocalTrace/FileTraceCollector.cxx index 4e722c12a..55a595f7d 100644 --- a/src/SALOMELocalTrace/FileTraceCollector.cxx +++ b/src/SALOMELocalTrace/FileTraceCollector.cxx @@ -52,8 +52,7 @@ BaseTraceCollector* FileTraceCollector::instance(const char *fileName) { if (_singleton == 0) // no need of lock when singleton already exists { - int ret; - ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got { // the lock after the first test DEVTRACE("FileTraceCollector:: instance()"); @@ -70,7 +69,7 @@ BaseTraceCollector* FileTraceCollector::instance(const char *fileName) _singleton = myInstance; // _singleton known only when init done DEVTRACE("FileTraceCollector:: instance()-end"); } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } return _singleton; } @@ -168,8 +167,7 @@ void* FileTraceCollector::run(void* /*bid*/) FileTraceCollector:: ~FileTraceCollector() { - int ret; - ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton) { DEVTRACE("FileTraceCollector:: ~FileTraceCollector()"); @@ -179,15 +177,15 @@ FileTraceCollector:: ~FileTraceCollector() if (_threadId) { int ret = pthread_join(*_threadId, NULL); - if (ret) std::cerr << "error close FileTraceCollector : "<< ret << std::endl; - else DEVTRACE("FileTraceCollector destruction OK"); + if (ret) { std::cerr << "error close FileTraceCollector : "<< ret << std::endl; } + else { DEVTRACE("FileTraceCollector destruction OK"); } delete _threadId; _threadId = 0; _threadToClose = 0; } _singleton = 0; } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } // ============================================================================ diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index 25cdc0b6e..24fec5029 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -80,8 +80,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() { if (_singleton == 0) // no need of lock when singleton already exists { - int ret; - ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got { // the lock after the first test DEVTRACE("New buffer pool"); @@ -153,7 +152,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() } DEVTRACE("New buffer pool: end"); } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } return _singleton; } @@ -332,25 +331,24 @@ LocalTraceBufferPool::LocalTraceBufferPool() LocalTraceBufferPool::~LocalTraceBufferPool() { - int ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton) { DEVTRACE("LocalTraceBufferPool::~LocalTraceBufferPool()"); delete (_myThreadTrace); _myThreadTrace = 0; - int ret; #ifdef __APPLE__ dispatch_release(_freeBufferSemaphore); dispatch_release(_fullBufferSemaphore); #else - ret=sem_destroy(&_freeBufferSemaphore); - ret=sem_destroy(&_fullBufferSemaphore); + sem_destroy(&_freeBufferSemaphore); + sem_destroy(&_fullBufferSemaphore); #endif - ret=pthread_mutex_destroy(&_incrementMutex); + pthread_mutex_destroy(&_incrementMutex); DEVTRACE("LocalTraceBufferPool::~LocalTraceBufferPool()-end"); _singleton = 0; } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } // ============================================================================ @@ -361,9 +359,8 @@ LocalTraceBufferPool::~LocalTraceBufferPool() unsigned long LocalTraceBufferPool::lockedIncrement(unsigned long& pos) { - int ret; - ret = pthread_mutex_lock(&_incrementMutex); // lock access to counters + pthread_mutex_lock(&_incrementMutex); // lock access to counters unsigned long mypos = ++pos; - ret = pthread_mutex_unlock(&_incrementMutex); // release lock + pthread_mutex_unlock(&_incrementMutex); // release lock return mypos; } diff --git a/src/SALOMELocalTrace/LocalTraceCollector.cxx b/src/SALOMELocalTrace/LocalTraceCollector.cxx index 418db1d2a..7e8e6cb94 100644 --- a/src/SALOMELocalTrace/LocalTraceCollector.cxx +++ b/src/SALOMELocalTrace/LocalTraceCollector.cxx @@ -47,8 +47,7 @@ BaseTraceCollector* LocalTraceCollector::instance() { if (_singleton == 0) // no need of lock when singleton already exists { - int ret; - ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got { // the lock after the first test BaseTraceCollector* myInstance = new LocalTraceCollector(); @@ -60,7 +59,7 @@ BaseTraceCollector* LocalTraceCollector::instance() sem_wait(&_sem); _singleton = myInstance; // _singleton known only when init done } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } return _singleton; } @@ -144,8 +143,7 @@ void* LocalTraceCollector::run(void* /*bid*/) LocalTraceCollector:: ~LocalTraceCollector() { - int ret; - ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton) { DEVTRACE("LocalTraceCollector:: ~LocalTraceCollector()"); @@ -155,15 +153,15 @@ LocalTraceCollector:: ~LocalTraceCollector() if (_threadId) { int ret = pthread_join(*_threadId, NULL); - if (ret) std::cerr << "error close LocalTraceCollector : "<< ret << std::endl; - else DEVTRACE("LocalTraceCollector destruction OK"); + if (ret) { std::cerr << "error close LocalTraceCollector : "<< ret << std::endl; } + else { DEVTRACE("LocalTraceCollector destruction OK"); } delete _threadId; _threadId = 0; _threadToClose = 0; } _singleton = 0; } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } // ============================================================================ diff --git a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx index 657cc36ed..ede2d20e9 100644 --- a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx +++ b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx @@ -190,6 +190,7 @@ SALOMELocalTraceTest::testLoadBufferPoolFile() void *PrintHello(void *threadid) { + SALOME_UNUSED(threadid); // unused in release mode #if defined(_DEBUG_) || defined(_DEBUG) long id_thread = (long)threadid; for (int i=0; icreateRdExtVarInternal(_var_name,data2); } -TransactionRdExtVarFreeStyleCreate::TransactionRdExtVarFreeStyleCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue, const char *compareFuncContent):_cmp_func_content(compareFuncContent),_cmp_func(nullptr),TransactionRdExtVarCreate(dsct,varName,constValue) +TransactionRdExtVarFreeStyleCreate::TransactionRdExtVarFreeStyleCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue, const char *compareFuncContent):TransactionRdExtVarCreate(dsct,varName,constValue),_cmp_func_content(compareFuncContent),_cmp_func(nullptr) { constexpr char EXPECTED_COMPARE_FUNC_NAME[]="comptchev"; SALOME::AutoPyRef context(PyDict_New()); diff --git a/src/SALOMETraceCollector/SALOMETraceCollector.cxx b/src/SALOMETraceCollector/SALOMETraceCollector.cxx index 179dce1bb..1263f9502 100644 --- a/src/SALOMETraceCollector/SALOMETraceCollector.cxx +++ b/src/SALOMETraceCollector/SALOMETraceCollector.cxx @@ -56,8 +56,7 @@ BaseTraceCollector* SALOMETraceCollector::instance() { if (_singleton == 0) // no need of lock when singleton already exists { - int ret; - ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton == 0) // another thread may have got { // the lock after the first test BaseTraceCollector* myInstance = new SALOMETraceCollector(); @@ -74,7 +73,7 @@ BaseTraceCollector* SALOMETraceCollector::instance() sem_wait(&_sem); _singleton = myInstance; // _singleton known only when init done } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } return _singleton; } @@ -176,8 +175,7 @@ void* SALOMETraceCollector::run(void* /*bid*/) SALOMETraceCollector:: ~SALOMETraceCollector() { - int ret; - ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone + pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone if (_singleton) { DEVTRACE("SALOMETraceCollector:: ~SALOMETraceCollector()"); @@ -187,15 +185,15 @@ SALOMETraceCollector:: ~SALOMETraceCollector() if (_threadId) { int ret = pthread_join(*_threadId, NULL); - if (ret) std::cerr << "error close SALOMETraceCollector : "<< ret << std::endl; - else DEVTRACE("SALOMETraceCollector destruction OK"); + if (ret) { std::cerr << "error close SALOMETraceCollector : "<< ret << std::endl; } + else { DEVTRACE("SALOMETraceCollector destruction OK") }; delete _threadId; _threadId = 0; _threadToClose = 0; } _singleton = 0; } - ret = pthread_mutex_unlock(&_singletonMutex); // release lock + pthread_mutex_unlock(&_singletonMutex); // release lock } // ============================================================================ diff --git a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx index 0a50f57e2..c69f05f32 100644 --- a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx +++ b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx @@ -106,6 +106,7 @@ SALOMETraceCollectorTest::testLoadBufferPoolCORBA() void *PrintHello(void *threadid) { + SALOME_UNUSED(threadid); // unused in release mode #if defined(_DEBUG_) || defined(_DEBUG) long id_thread = (long)threadid; for (int i=0; i *Destructeurs; virtual ~DESTRUCTEUR_GENERIQUE_() {}//!< virtual destructor - static const int Ajout( DESTRUCTEUR_GENERIQUE_ &objet );//!< adds a destruction object to the list of destructions + static int Ajout( DESTRUCTEUR_GENERIQUE_ &objet );//!< adds a destruction object to the list of destructions virtual void operator()( void )=0 ;//!< performs the destruction }; diff --git a/src/Utils/Utils_Identity.cxx b/src/Utils/Utils_Identity.cxx index 28b19165b..7747f5ce4 100644 --- a/src/Utils/Utils_Identity.cxx +++ b/src/Utils/Utils_Identity.cxx @@ -77,7 +77,7 @@ const char* get_adip( void ) const in_addr ip_addr=*(struct in_addr*)(pour_adip->h_addr) ; return duplicate(inet_ntoa(ip_addr)); } -const char* const get_pwname( void ) +const char* get_pwname( void ) { struct passwd *papa = getpwuid(getuid()); return papa->pw_name ; @@ -179,12 +179,12 @@ PSID getuid() { Identity::Identity( const char *name ): _name(duplicate(name)),\ - _hostid(get_uname()),\ _adip(get_adip()),\ + _hostid(get_uname()),\ + _pid(getpid()) ,\ _uid(getuid()) ,\ _pwname(get_pwname()) ,\ _dir(getcwd(NULL,4096)),\ - _pid(getpid()) ,\ _start(time(NULL)),\ _cstart(ctime(&_start)) //CCRT @@ -215,32 +215,32 @@ Identity::~Identity(void) /* Accessors */ /*------------*/ -const char* const Identity::name (void) const +const char* Identity::name (void) const { return _name ; } #ifndef WIN32 - const pid_t& Identity::pid(void) const +const pid_t& Identity::pid(void) const #else - const DWORD& Identity::pid(void) const +const DWORD& Identity::pid(void) const #endif { return _pid ; } #ifndef WIN32 - const struct utsname &Identity::hostid(void) const +const struct utsname &Identity::hostid(void) const #else - const char* const Identity::hostid(void) const +const char* Identity::hostid(void) const #endif { return _hostid ; } #ifndef WIN32 - const uid_t& Identity::uid(void) const +const uid_t& Identity::uid(void) const #else - const PSID& Identity::uid(void) const +const PSID& Identity::uid(void) const #endif { return _uid ; @@ -249,15 +249,15 @@ const time_t &Identity::start(void) const { return _start ; } -const char* const Identity::rep (void) const +const char* Identity::rep (void) const { return _dir ; } -const char* const Identity::pwname (void) const +const char* Identity::pwname (void) const { return _pwname ; } -const char* const Identity::adip (void) const +const char* Identity::adip (void) const { return _adip ; } diff --git a/src/Utils/Utils_Identity.hxx b/src/Utils/Utils_Identity.hxx index 3885bb5b1..8743c70b0 100644 --- a/src/Utils/Utils_Identity.hxx +++ b/src/Utils/Utils_Identity.hxx @@ -79,15 +79,15 @@ public : const uid_t& uid(void) const; #else const DWORD& pid(void) const; - const char* const hostid(void) const; + const char* hostid(void) const; const PSID& uid(void) const; #endif - const char* const name( void ) const; - const char* const adip(void) const; - const char* const pwname(void) const; + const char* name( void ) const; + const char* adip(void) const; + const char* pwname(void) const; const time_t& start(void) const; - const char* const rep (void) const; + const char* rep (void) const; const char* host_char(void ) const; const char* start_char(void) const; -- 2.39.2