From: SALOME Date: Tue, 18 Aug 2020 14:32:19 +0000 (+0300) Subject: fight warnings c++17 error throw(). Build KERNEL finished X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=463899c4017f9fa78e7066b435bba587632a4e43;p=modules%2Fkernel.git fight warnings c++17 error throw(). Build KERNEL finished --- diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 68de29edc..665804255 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -368,7 +368,7 @@ Engines::Container_ptr SALOME_ContainerManager::GiveContainer(const Engines::Con break; } } - catch(const SALOME_Exception & /*ex*/) //!< TODO: unused variable + catch(const SALOME_Exception & ex) //!< TODO: unused variable { MESSAGE("[GiveContainer] Exception in ResourceManager find !: " << ex.what()); return ret; diff --git a/src/DSC/DSC_User/DSC_Exception.hxx b/src/DSC/DSC_User/DSC_Exception.hxx index d70dca939..15a55778f 100644 --- a/src/DSC/DSC_User/DSC_Exception.hxx +++ b/src/DSC/DSC_User/DSC_Exception.hxx @@ -130,7 +130,7 @@ struct DSC_Exception : public SALOME_Exception { _what = oss; } - virtual const char* what( void ) const + virtual const char* what( void ) const noexcept { return _what.c_str() ; } diff --git a/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx b/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx index 5f960e244..16c25ba8f 100644 --- a/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx +++ b/src/DSC/DSC_User/Datastream/Calcium/CalciumGenericProvidesPort.hxx @@ -140,10 +140,10 @@ } \ \ virtual void set_property(const char * name, const CORBA::Any& value) \ - throw (Ports::NotDefined, Ports::BadType, Ports::BadValue); \ + ; \ \ virtual CORBA::Any* get_property(const char* name) \ - throw (Ports::NotDefined); \ + ; \ \ virtual void provides_port_changed(int connection_nbr, \ const Engines::DSC::Message message) { \ @@ -172,7 +172,7 @@ specificPortName::~specificPortName(void) {}; \ \ void specificPortName::set_property(const char * name, const CORBA::Any& value) \ - throw (Ports::NotDefined, Ports::BadType, Ports::BadValue) { \ + { \ \ const std::string key(name); \ CORBA::Long sl; \ @@ -215,7 +215,7 @@ \ \ CORBA::Any* specificPortName::get_property(const char* name) \ - throw (Ports::NotDefined) { \ + { \ const std::string key(name); \ CORBA::Any* value=new CORBA::Any; \ if (key == "StorageLevel" ) \ diff --git a/src/DSC/DSC_User/Superv_Component_i.hxx b/src/DSC/DSC_User/Superv_Component_i.hxx index fd8aae2c4..43972c670 100644 --- a/src/DSC/DSC_User/Superv_Component_i.hxx +++ b/src/DSC/DSC_User/Superv_Component_i.hxx @@ -363,7 +363,7 @@ Superv_Component_i::add_port(const char * port_fab_type, template SpecificPortType * Superv_Component_i::get_port( const char * port_name) - throw (PortNotDefined, PortNotConnected, BadCast, UnexpectedState) + { assert(port_name); diff --git a/src/DSC/DSC_User/test_DSC_Exception.cxx b/src/DSC/DSC_User/test_DSC_Exception.cxx index f11d1361b..340bc37fa 100644 --- a/src/DSC/DSC_User/test_DSC_Exception.cxx +++ b/src/DSC/DSC_User/test_DSC_Exception.cxx @@ -36,19 +36,19 @@ public: A() {}; virtual ~A() {}; // La salome exception ne permet pas de passer une chaine "" - void lanceException1_1() throw(Exp1) { throw Exp1("_");} - void lanceException1_2() throw(Exp1) { throw Exp1("Ceci est l'exception 1_2");} - void lanceException1_3() throw(Exp1) { throw Exp1(LOC("Ceci est l'exception 1_3"));} - void lanceException1_4() throw(Exp1) { throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_4" )); } - void lanceException1_5() throw(Exp1) { + void lanceException1_1() { throw Exp1("_");} + void lanceException1_2() { throw Exp1("Ceci est l'exception 1_2");} + void lanceException1_3() { throw Exp1(LOC("Ceci est l'exception 1_3"));} + void lanceException1_4() { throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_4" )); } + void lanceException1_5() { int a=1; throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_5 avec la valeur A : " << a )); } - void lanceException1_6() throw(Exp1) { + void lanceException1_6() { Exp1 exp1(LOC(OSS() << "Ceci est l'exeption 1_6")); std::cout << "Affichage de exp1.what() dans lanceException1_6() " << exp1.what() << std::endl; throw Exp1(exp1); } - void lanceException1_7() throw(Exp1) { + void lanceException1_7() { throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_7")); } }; diff --git a/src/Launcher_SWIG/CMakeLists.txt b/src/Launcher_SWIG/CMakeLists.txt index a98274e97..92064ec7c 100644 --- a/src/Launcher_SWIG/CMakeLists.txt +++ b/src/Launcher_SWIG/CMakeLists.txt @@ -35,6 +35,7 @@ SET_SOURCE_FILES_PROPERTIES(Launcher.i PROPERTIES SWIG_FLAGS "-py3") INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${LIBBATCH_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../Basics ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager ${CMAKE_CURRENT_SOURCE_DIR}/../Launcher ) diff --git a/src/Registry/RegistryConnexion.cxx b/src/Registry/RegistryConnexion.cxx index a5cf3dc07..4760d5a9b 100644 --- a/src/Registry/RegistryConnexion.cxx +++ b/src/Registry/RegistryConnexion.cxx @@ -40,7 +40,7 @@ extern "C" # include } -Registry::Components_var Connexion( int argc , char **argv , const char *ptrSessionName ) throw( CommException ) +Registry::Components_var Connexion( int argc , char **argv , const char *ptrSessionName ) { Registry::Components_var varComponents = 0 ; ASSERT(ptrSessionName) ; @@ -119,7 +119,7 @@ void RegistryConnexion::add( const char *aName ) infos.pid = lesInfos.pid() ; infos.machine = CORBA::string_dup( lesInfos.host_char() ) ; infos.adip = CORBA::string_dup( lesInfos.adip() ) ; - infos.uid = /*(long)*/(CORBA::Long)((LONG_PTR)lesInfos.uid()) ; //!< TODO: pointer truncation from const PSID to long + infos.uid = /*(long)*/(CORBA::Long)lesInfos.uid() ; //!< TODO: pointer truncation from const PSID to long infos.pwname = CORBA::string_dup( lesInfos.pwname() ) ; infos.tc_start = (CORBA::Long)lesInfos.start() ; //!< TODO: conversation from const time_t to CORBA::Long infos.tc_hello = 0 ; diff --git a/src/SALOMEDS/SALOMEDS_Client.cxx b/src/SALOMEDS/SALOMEDS_Client.cxx index 89c415e2f..12810eded 100644 --- a/src/SALOMEDS/SALOMEDS_Client.cxx +++ b/src/SALOMEDS/SALOMEDS_Client.cxx @@ -279,7 +279,7 @@ int main(int argc, char** argv) catch(CORBA::Exception&) { MESSAGE( "Caught CORBA::Exception." ) } - catch(omniORB::fatalException& /*fe*/) { //!< TODO: unused variable + catch(omniORB::fatalException& fe) { //!< TODO: unused variable MESSAGE( "Caught omniORB::fatalException:" ) MESSAGE( " file: " << fe.file() ) MESSAGE( " line: " << fe.line() )