From: adam Date: Fri, 19 Mar 2010 17:53:28 +0000 (+0000) Subject: Remove some warnings in windows compilation ... X-Git-Tag: V5_1_4a1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0617411fefe95f749bca1465f02139971f0c231b;p=modules%2Fkernel.git Remove some warnings in windows compilation ... --- diff --git a/src/Basics/BasicsGenericDestructor.hxx b/src/Basics/BasicsGenericDestructor.hxx index 5b76c7380..189c4441b 100644 --- a/src/Basics/BasicsGenericDestructor.hxx +++ b/src/Basics/BasicsGenericDestructor.hxx @@ -48,6 +48,10 @@ #define DEVTRACE(msg) #endif +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + // ============================================================================ /*! * The PROTECTED_DELETE base class provides a protected destructor. diff --git a/src/Basics/Basics_DirUtils.cxx b/src/Basics/Basics_DirUtils.cxx index 613368ba0..a666317ed 100644 --- a/src/Basics/Basics_DirUtils.cxx +++ b/src/Basics/Basics_DirUtils.cxx @@ -50,7 +50,7 @@ namespace Kernel_Utils { int pos = file_path.rfind( _separator_ ); if ( pos >= 0 ) - return pos < file_path.size()-1 ? file_path.substr( pos+1 ) : ""; + return pos < (int)file_path.size()-1 ? file_path.substr( pos+1 ) : ""; return file_path; } @@ -181,14 +181,14 @@ namespace Kernel_Utils string::size_type length = path.length(); //detect all separators in Unix format - for ( int i = 0; i < length; i++ ) + for ( unsigned int i = 0; i < length; i++ ) { if( path[i] == '/' ) path[i] = '|'; } //detect all separators in Windows format - for ( int i = 0; i < length; i++ ) + for ( unsigned int i = 0; i < length; i++ ) { if( path[i] == '\\' ) path[i] = '|'; @@ -214,7 +214,7 @@ namespace Kernel_Utils } length = path.length(); - for ( int i = 0; i < length; i++ ) + for ( unsigned int i = 0; i < length; i++ ) { if( path[i] == '|' ) path[i] = _separator_; diff --git a/src/DF/DF_ChildIterator.cxx b/src/DF/DF_ChildIterator.cxx index 834c36159..a7b73c6f6 100644 --- a/src/DF/DF_ChildIterator.cxx +++ b/src/DF/DF_ChildIterator.cxx @@ -59,7 +59,7 @@ DF_Label DF_ChildIterator::Value() //Returns true if there is a current Label bool DF_ChildIterator::More() { - return bool(_current); + return _current!=0; } //Moves to the next Label diff --git a/src/DF/DF_Label.cxx b/src/DF/DF_Label.cxx index f83d1521c..c26b891d1 100644 --- a/src/DF/DF_Label.cxx +++ b/src/DF/DF_Label.cxx @@ -136,7 +136,7 @@ int DF_Label::Tag() const bool DF_Label::IsAttached() { if(!_node) return false; - return (bool)(_node->_document); + return _node->_document != 0; } //Searches an Attribute with given ID located on this Label. @@ -261,7 +261,7 @@ bool DF_Label::HasChild() const { if(!_node) return false; - return (bool)(_node->_firstChild); + return _node->_firstChild != 0; } //Returns a number of child Labels. diff --git a/src/DF/testDF.cxx b/src/DF/testDF.cxx index c73c20d5b..1e44603f3 100644 --- a/src/DF/testDF.cxx +++ b/src/DF/testDF.cxx @@ -43,8 +43,8 @@ #include #else #include -#include #include +#include #endif using namespace std; diff --git a/src/GenericObj/SALOME_GenericObj_i.hh b/src/GenericObj/SALOME_GenericObj_i.hh index a7f03c893..6dcedcf2d 100644 --- a/src/GenericObj/SALOME_GenericObj_i.hh +++ b/src/GenericObj/SALOME_GenericObj_i.hh @@ -41,6 +41,11 @@ # define GENERICOBJ_EXPORT #endif +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + namespace SALOME{ class GENERICOBJ_EXPORT GenericObj_i : public virtual POA_SALOME::GenericObj, diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 17642df5b..33750e609 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -37,6 +37,9 @@ #include #include #include +#define open _open +#define read _read +#define close _close #define dir_separator '\\' #else #define dir_separator '/' @@ -125,7 +128,7 @@ char* HDFascii::ConvertFromHDFToASCII(const char* thePath, fprintf(fp, "%s\n", ASCIIHDF_ID); fprintf(fp, "%i\n", nbsons+nbAttr); - for(unsigned j=0; jGetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(attr_name, hdf_file); delete attr_name; @@ -189,7 +192,7 @@ void SaveGroupInASCIIfile(HDFgroup *hdf_group, FILE* fp, int ident) fprintf(fp, "%s %i\n", name, nbsons+nbAttr); delete [] name; - for(unsigned j=0; jGetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(name, hdf_group); delete [] name; @@ -230,7 +233,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) { hdf_dataset->OpenOnDisk(); - long size = hdf_dataset->GetSize(); + long size = (long) hdf_dataset->GetSize(); long ndim = hdf_dataset->nDim(); //Get number of dimesions hdf_size *dim = new hdf_size[ndim]; hdf_type type = hdf_dataset->GetType(); @@ -301,7 +304,7 @@ void SaveDatasetInASCIIfile(HDFdataset *hdf_dataset, FILE* fp, int ident) fprintf(fp, "\n"); - for ( unsigned j=0; jGetAttributeName(j); HDFattribute *hdf_attribute = new HDFattribute(name, hdf_dataset); diff --git a/src/HDFPersist/HDFconvert.cc b/src/HDFPersist/HDFconvert.cc index 7fe03f887..fca543919 100644 --- a/src/HDFPersist/HDFconvert.cc +++ b/src/HDFPersist/HDFconvert.cc @@ -29,6 +29,8 @@ using namespace std; #ifdef WIN32 #include #include +#define open _open +#define close _close #endif int HDFConvert::FromAscii(const string& file, const HDFcontainerObject & hdf_container, const string& nomdataset) diff --git a/src/HDFPersist/HDFdataset.cc b/src/HDFPersist/HDFdataset.cc index 627609a29..790e3d065 100644 --- a/src/HDFPersist/HDFdataset.cc +++ b/src/HDFPersist/HDFdataset.cc @@ -166,7 +166,7 @@ void HDFdataset::GetDim(hdf_size dim[]) dim[i] = _dim[i]; } -int HDFdataset::GetSize() +hdf_size HDFdataset::GetSize() { int size_type; diff --git a/src/HDFPersist/HDFdataset.hxx b/src/HDFPersist/HDFdataset.hxx index a221f8ca0..c489b0dbc 100644 --- a/src/HDFPersist/HDFdataset.hxx +++ b/src/HDFPersist/HDFdataset.hxx @@ -42,7 +42,7 @@ private : hdf_type _type; hdf_size *_dim; hdf_byte_order _byte_order; - int _size; + hdf_size _size; int _ndim; char* _attribute; @@ -64,7 +64,7 @@ public: hdf_type GetType(); int nDim(); void GetDim(hdf_size dim[]); - int GetSize(); + hdf_size GetSize(); hdf_object_type GetObjectType(); hdf_byte_order GetOrder(); diff --git a/src/HDFPersist/HDFfile.cc b/src/HDFPersist/HDFfile.cc index b0e8ac605..453098c26 100644 --- a/src/HDFPersist/HDFfile.cc +++ b/src/HDFPersist/HDFfile.cc @@ -31,6 +31,7 @@ extern "C" #else #include #define F_OK 0 +#define access _access #endif #include } diff --git a/src/HDFPersist/HDFobject.cc b/src/HDFPersist/HDFobject.cc index 0686a6c73..ae7358784 100644 --- a/src/HDFPersist/HDFobject.cc +++ b/src/HDFPersist/HDFobject.cc @@ -33,6 +33,10 @@ extern "C" #include using namespace std; +#ifdef WNT +#define strdup _strdup +#endif + HDFobject::HDFobject(const char *name) { HDFerrorModeLock(); diff --git a/src/Logger/SALOME_Logger_Server.hxx b/src/Logger/SALOME_Logger_Server.hxx index 8c9f19d5c..d1ceedd35 100644 --- a/src/Logger/SALOME_Logger_Server.hxx +++ b/src/Logger/SALOME_Logger_Server.hxx @@ -46,6 +46,9 @@ # define LOGGER_EXPORT #endif +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#endif class LOGGER_EXPORT Logger : public POA_SALOME_Logger::Logger diff --git a/src/Logger/SALOME_Logger_Server_main.cxx b/src/Logger/SALOME_Logger_Server_main.cxx index 70d072fa1..459bb7fd2 100644 --- a/src/Logger/SALOME_Logger_Server_main.cxx +++ b/src/Logger/SALOME_Logger_Server_main.cxx @@ -114,7 +114,7 @@ int main(int argc, char **argv) orb->run() ; orb->destroy() ; } - catch(CORBA::COMM_FAILURE& ex) + catch(CORBA::COMM_FAILURE&) { std::cerr << "Caught system exception COMM_FAILURE -- unable to contact the " << "object." << std::endl; diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx index 59a442b2d..dd3850669 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Acomponent_impl.hxx @@ -35,6 +35,11 @@ #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4290) // Warning Exception ... +#endif + class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent { public: diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx index ab2f3629e..47813f8eb 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Client.cxx @@ -141,7 +141,7 @@ int main(int argc,char **argv) INFOS("CosNaming::NamingContext::NotEmpty") } - catch(CORBA::Exception &sysEx) { + catch(CORBA::Exception &) { INFOS("Caught CORBA::Exception.") } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx index e794d0b03..172de3898 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.cxx @@ -479,7 +479,7 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) // Tag test_component_multistudy if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_multistudy) ) - _aModule.multistudy = atoi( aContent.c_str() ); + _aModule.multistudy = atoi( aContent.c_str() ) != 0; // Tag test_component_impltype if ( !xmlStrcmp(aComponentSubNode->name, (const xmlChar*)test_component_impltype) ) @@ -542,11 +542,11 @@ void SALOME_ModuleCatalog_Handler::ProcessXmlDocument(xmlDocPtr theDoc) // Tag test_defaultservice if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_defaultservice) ) - _aService.byDefault = (bool)(atoi((const char*)aCompServiceData)); + _aService.byDefault = atoi((const char*)aCompServiceData) !=0 ; // Tag test_typeofnode if ( !xmlStrcmp(aCompServiceSubNode->name, (const xmlChar*)test_typeofnode) ) - _aService.typeOfNode = (bool)(atoi((const char*)aCompServiceData));; + _aService.typeOfNode = atoi((const char*)aCompServiceData) !=0 ; xmlFree(aCompServiceData); } diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx index 2e6eaff65..21f3e5900 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Handler.hxx @@ -38,6 +38,10 @@ #include +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + class MODULECATALOG_EXPORT SALOME_ModuleCatalog_Handler { public: diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx index 34f97a5c5..906f77543 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_Server.cxx @@ -48,7 +48,9 @@ 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; diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx index d0c2e7bb9..6f8f9b34f 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx @@ -211,7 +211,7 @@ SALOME_ModuleCatalog::ListOfTypeDefinition* SALOME_ModuleCatalogImpl::GetTypes() SALOME_ModuleCatalog::ListOfTypeDefinition_var type_list = new SALOME_ModuleCatalog::ListOfTypeDefinition(); type_list->length(_typeList.size()); - for (int ind = 0 ; ind < _typeList.size() ; ind++) + for (unsigned int ind = 0 ; ind < _typeList.size() ; ind++) { //no real need to call string_dup, omniorb calls it on operator= (const char *) but it is safer type_list[ind].name=CORBA::string_dup(_typeList[ind].name.c_str()); diff --git a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx index 9017dfcf8..553665ea0 100644 --- a/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx +++ b/src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx @@ -38,6 +38,11 @@ #include #include CORBA_SERVER_HEADER(SALOME_ModuleCatalog) +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4290) // Warning Exception ... +#endif + class MODULECATALOG_EXPORT SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog { public: diff --git a/src/NamingService/SALOME_NamingService.cxx b/src/NamingService/SALOME_NamingService.cxx index ce4986933..03c2a43d4 100644 --- a/src/NamingService/SALOME_NamingService.cxx +++ b/src/NamingService/SALOME_NamingService.cxx @@ -35,6 +35,10 @@ #include #include +#ifdef WNT +#define strdup _strdup +#endif + using namespace std; /*! \class SALOME_NamingService diff --git a/src/NamingService/SALOME_NamingService.hxx b/src/NamingService/SALOME_NamingService.hxx index fbbc3601d..0be8b6cc4 100644 --- a/src/NamingService/SALOME_NamingService.hxx +++ b/src/NamingService/SALOME_NamingService.hxx @@ -40,6 +40,10 @@ #include "SALOME_NamingService_defs.hxx" +#ifdef WNT +#pragma warning(disable:4290) // Warning Exception ... +#endif + class NAMINGSERVICE_EXPORT SALOME_NamingService { public: diff --git a/src/Notification/NOTIFICATION.cxx b/src/Notification/NOTIFICATION.cxx index d1dbcd110..d2f083a78 100644 --- a/src/Notification/NOTIFICATION.cxx +++ b/src/Notification/NOTIFICATION.cxx @@ -46,10 +46,10 @@ CosNA_EventChannel_ptr NOTIFICATION_channel() { MESSAGE("NOTIFICATION Error : failed to obtain context for NameService"); return(channel); }; - } catch(CORBA::ORB::InvalidName& ex) { + } catch(CORBA::ORB::InvalidName& ) { MESSAGE("NOTIFICATION Error : service required is invalid [does not exist]"); return(channel); - } catch (CORBA::SystemException& ex) { + } catch (CORBA::SystemException& ) { MESSAGE("NOTIFICATION Error : caught system exception COMM_FAILURE"); return(channel); } catch (...) { @@ -67,9 +67,9 @@ CosNA_EventChannel_ptr NOTIFICATION_channel() { if (CORBA::is_nil(channel)) { MESSAGE("NOTIFICATION Error : failed to narrow object found in naming service"); }; - } catch(CORBA::ORB::InvalidName& ex) { + } catch(CORBA::ORB::InvalidName& ) { MESSAGE("NOTIFICATION Error : invalid name"); - } catch (CORBA::SystemException& ex) { + } catch (CORBA::SystemException& ) { MESSAGE("NOTIFICATION Error : caught system exception COMM_FAILURE while resolving event channel name"); } catch (...) { MESSAGE("NOTIFICATION Error : caught exception while resolving event channel name"); diff --git a/src/Notification/NOTIFICATION_Consumer.cxx b/src/Notification/NOTIFICATION_Consumer.cxx index d9ab866c7..0c60660f3 100644 --- a/src/Notification/NOTIFICATION_Consumer.cxx +++ b/src/Notification/NOTIFICATION_Consumer.cxx @@ -50,9 +50,9 @@ NOTIFICATION_Consumer::NOTIFICATION_Consumer(): proxy_supplier->connect_structured_pull_consumer(_this()); _ok = true; MESSAGE("NOTIFICATION Info : successfully connection for pull consumer notification"); - } catch (CORBA::BAD_PARAM& ex) { + } catch (CORBA::BAD_PARAM&) { MESSAGE("NOTIFICATION Error : pull consumer BAD_PARAM exception while connecting"); - } catch (CosEventChannelAdmin::AlreadyConnected& ex) { + } catch (CosEventChannelAdmin::AlreadyConnected&) { MESSAGE("NOTIFICATION Error : pull consumer already connected"); } catch (...) { MESSAGE("NOTIFICATION Error : pull consumer failed to connect"); diff --git a/src/Notification/NOTIFICATION_Supplier.cxx b/src/Notification/NOTIFICATION_Supplier.cxx index 00a214d9f..ae094ff61 100644 --- a/src/Notification/NOTIFICATION_Supplier.cxx +++ b/src/Notification/NOTIFICATION_Supplier.cxx @@ -55,9 +55,9 @@ NOTIFICATION_Supplier::NOTIFICATION_Supplier(const char* instanceName, bool noti proxy_consumer->connect_structured_push_supplier(_this()); _ok = true; MESSAGE("NOTIFICATION Info : successfully connection for push supplier notification"); - } catch (CORBA::BAD_PARAM& ex) { + } catch (CORBA::BAD_PARAM&) { MESSAGE("NOTIFICATION Error : push supplier BAD_PARAM Exception while connecting"); - } catch (CosEventChannelAdmin::AlreadyConnected& ex) { + } catch (CosEventChannelAdmin::AlreadyConnected&) { MESSAGE("NOTIFICATION Error : push supplier already connected"); } catch (...) { MESSAGE("NOTIFICATION Error : push supplier failed to connect"); diff --git a/src/Notification/NOTIFICATION_Supplier.hxx b/src/Notification/NOTIFICATION_Supplier.hxx index 1dccf5c50..66fa0b262 100644 --- a/src/Notification/NOTIFICATION_Supplier.hxx +++ b/src/Notification/NOTIFICATION_Supplier.hxx @@ -29,6 +29,10 @@ #include "SALOME_NOTIFICATION.hxx" +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#endif + class NOTIFICATION_EXPORT NOTIFICATION_Supplier: public POA_CosNotifyComm::StructuredPushSupplier { public: NOTIFICATION_Supplier(const char* instanceName, bool notif); diff --git a/src/Registry/RegistryService.cxx b/src/Registry/RegistryService.cxx index 0dd569c61..a3324c52d 100644 --- a/src/Registry/RegistryService.cxx +++ b/src/Registry/RegistryService.cxx @@ -38,6 +38,7 @@ extern "C" #include #else #include +#define getpid _getpid #endif using namespace std; diff --git a/src/Registry/RegistryService.hxx b/src/Registry/RegistryService.hxx index 89a5a733e..c25ac622a 100644 --- a/src/Registry/RegistryService.hxx +++ b/src/Registry/RegistryService.hxx @@ -35,6 +35,11 @@ # include +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + class REGISTRY_EXPORT RegistryService : public POA_Registry::Components //, public PortableServer::RefCountServantBase { diff --git a/src/Registry/SALOME_Registry_Server.cxx b/src/Registry/SALOME_Registry_Server.cxx index cf637665e..23cc25d3c 100644 --- a/src/Registry/SALOME_Registry_Server.cxx +++ b/src/Registry/SALOME_Registry_Server.cxx @@ -77,7 +77,9 @@ 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; @@ -179,10 +181,10 @@ int main( int argc , char **argv ) MESSAGE("RegistryService servant already existing" ) ; exit( EXIT_FAILURE ) ; } - catch( const ServiceUnreachable &ex ) + catch( const ServiceUnreachable & ) { } - catch( const CORBA::Exception &exx ) + catch( const CORBA::Exception & ) { } string absoluteName = string("/") + registryName; @@ -205,7 +207,7 @@ int main( int argc , char **argv ) #endif orb->run() ; } - catch( const CORBA::Exception &ex ) + catch( const CORBA::Exception & ) { MESSAGE("System error") ; return EXIT_FAILURE ; diff --git a/src/ResourcesManager/ResourcesManager.hxx b/src/ResourcesManager/ResourcesManager.hxx index 1afcf69a5..ba6f593f9 100644 --- a/src/ResourcesManager/ResourcesManager.hxx +++ b/src/ResourcesManager/ResourcesManager.hxx @@ -38,6 +38,11 @@ #include #endif +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#pragma warning(disable:4290) // Warning Exception ... +#endif + // --- WARNING --- // The call of BuildTempFileToLaunchRemoteContainer and RmTmpFile must be done // in a critical section to be sure to be clean. diff --git a/src/ResourcesManager/SALOME_LoadRateManager.cxx b/src/ResourcesManager/SALOME_LoadRateManager.cxx index c422a3fd0..c52550330 100644 --- a/src/ResourcesManager/SALOME_LoadRateManager.cxx +++ b/src/ResourcesManager/SALOME_LoadRateManager.cxx @@ -54,7 +54,7 @@ string LoadRateManagerCycl::Find(const vector& hosts, else{ iproc = 1; imachine++; - if(imachine >= hosts.size()) + if(imachine >= (int)hosts.size()) imachine = 0; return string(hosts[imachine]); } diff --git a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx index ae1d56ffe..261860b59 100644 --- a/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx +++ b/src/ResourcesManager/SALOME_ResourcesCatalog_Parser.cxx @@ -154,7 +154,7 @@ void ParserResourcesType::Print() "Modules : " << endl << "Components : " << endl; - for(int i=0;i #include +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#endif + enum AccessProtocolType {rsh, ssh}; enum AccessModeType {interactive, batch}; diff --git a/src/ResourcesManager/SALOME_ResourcesManager.hxx b/src/ResourcesManager/SALOME_ResourcesManager.hxx index e69f733bb..715e7626e 100644 --- a/src/ResourcesManager/SALOME_ResourcesManager.hxx +++ b/src/ResourcesManager/SALOME_ResourcesManager.hxx @@ -45,6 +45,10 @@ # define SALOMERESOURCESMANAGER_EXPORT #endif +#ifdef WNT +#pragma warning(disable:4275) // Disable warning interface non dll +#endif + // --- WARNING --- // The call of BuildTempFileToLaunchRemoteContainer and RmTmpFile must be done // in a critical section to be sure to be clean. diff --git a/src/Utils/Utils_ORB_INIT.cxx b/src/Utils/Utils_ORB_INIT.cxx index 5c59da51b..884cc90d4 100644 --- a/src/Utils/Utils_ORB_INIT.cxx +++ b/src/Utils/Utils_ORB_INIT.cxx @@ -67,7 +67,7 @@ CORBA::ORB_var &ORB_INIT::operator() ( int argc , char **argv ) throw( CommExcep _orb = CORBA::ORB_init( argc, argv, "omniORB3" ) ; #endif } - catch( const CORBA::Exception &ex ) + catch( const CORBA::Exception & ) { throw CommException( "Unable to create an ORB connexion" ) ; } diff --git a/src/Utils/Utils_ORB_INIT.hxx b/src/Utils/Utils_ORB_INIT.hxx index 73316217a..7458dc8db 100644 --- a/src/Utils/Utils_ORB_INIT.hxx +++ b/src/Utils/Utils_ORB_INIT.hxx @@ -36,6 +36,11 @@ #include "Utils_CommException.hxx" +#ifdef WNT +#pragma warning(disable:4251) // Warning DLL Interface ... +#pragma warning(disable:4290) // Warning Exception ... +#endif + /*! * Ce composant prend en charge la connexion et la deconnexion a l'orb * Il est souhaitable de l'utiliser dans un SINGLETON. diff --git a/src/Utils/Utils_SALOME_Exception.hxx b/src/Utils/Utils_SALOME_Exception.hxx index 3959e904c..b6b2d54a3 100644 --- a/src/Utils/Utils_SALOME_Exception.hxx +++ b/src/Utils/Utils_SALOME_Exception.hxx @@ -50,6 +50,7 @@ # define UTILS_EXPORT __declspec( dllexport ) # else # define UTILS_EXPORT __declspec( dllimport ) +# undef LOCALIZED # define LOCALIZED(message) #message # endif #else @@ -75,7 +76,7 @@ public : SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 ); SALOME_Exception( const SALOME_Exception &ex ); virtual ~SALOME_Exception() throw (); - friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex ); + UTILS_EXPORT friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex ); virtual const char *what( void ) const throw () ; } ; diff --git a/src/Utils/Utils_Timer.cxx b/src/Utils/Utils_Timer.cxx index 8c1716ef0..7c2ace79b 100644 --- a/src/Utils/Utils_Timer.cxx +++ b/src/Utils/Utils_Timer.cxx @@ -121,7 +121,7 @@ void Utils_Timer::ShowAbsolute(){ #ifndef WIN32 unsigned long Absolute_user = (unsigned long) ((timeval*)RefToCurrentTimeB)->tv_sec ; #else - unsigned long Absolute_user = *RefToCurrentTimeB; + unsigned long Absolute_user = (unsigned long) *RefToCurrentTimeB; #endif MESSAGE("Absolute time: " << Absolute_user << " seconds "); #endif