diff options
Diffstat (limited to 'TAO/tao/PortableServer')
-rw-r--r-- | TAO/tao/PortableServer/ImR_LocatorS.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/PortableServer/ImplRepoS.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Key_Adapters.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Object_Adapter.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Object_Adapter.h | 2 | ||||
-rw-r--r-- | TAO/tao/PortableServer/POA.cpp | 24 | ||||
-rw-r--r-- | TAO/tao/PortableServer/POAManager.i | 6 | ||||
-rw-r--r-- | TAO/tao/PortableServer/PolicyS.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.i | 3 | ||||
-rw-r--r-- | TAO/tao/PortableServer/ServerRequestInfo.cpp | 11 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Strategized_Object_Proxy_Broker.cpp | 4 |
12 files changed, 54 insertions, 39 deletions
diff --git a/TAO/tao/PortableServer/ImR_LocatorS.cpp b/TAO/tao/PortableServer/ImR_LocatorS.cpp index 663c736f795..db6a03ff5e7 100644 --- a/TAO/tao/PortableServer/ImR_LocatorS.cpp +++ b/TAO/tao/PortableServer/ImR_LocatorS.cpp @@ -1323,7 +1323,7 @@ ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_function (CORBA::Obje } int -ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_Initializer (long) +ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_Initializer (size_t) { ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_function_pointer = ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_function; @@ -1332,7 +1332,7 @@ ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_Initializer (long) } static int ImplementationRepository__TAO_Locator_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = - ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_Initializer)); + ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, ImplementationRepository__TAO_Locator_Proxy_Broker_Factory_Initializer)); /////////////////////////////////////////////////////////////////////// diff --git a/TAO/tao/PortableServer/ImplRepoS.cpp b/TAO/tao/PortableServer/ImplRepoS.cpp index 851b6351c28..133e61ac196 100644 --- a/TAO/tao/PortableServer/ImplRepoS.cpp +++ b/TAO/tao/PortableServer/ImplRepoS.cpp @@ -542,7 +542,7 @@ ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_function (CORBA: } int -ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_Initializer (long) +ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_Initializer (size_t) { ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_function_pointer = ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_function; @@ -551,7 +551,7 @@ ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_Initializer (lon } static int ImplementationRepository__TAO_ServerObject_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = - ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_Initializer)); + ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, ImplementationRepository__TAO_ServerObject_Proxy_Broker_Factory_Initializer)); /////////////////////////////////////////////////////////////////////// @@ -3012,7 +3012,7 @@ ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_function (CORB } int -ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_Initializer (long) +ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_Initializer (size_t) { ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_function_pointer = ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_function; @@ -3021,7 +3021,7 @@ ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_Initializer (l } static int ImplementationRepository__TAO_Administration_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = - ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_Initializer)); + ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, ImplementationRepository__TAO_Administration_Proxy_Broker_Factory_Initializer)); /////////////////////////////////////////////////////////////////////// @@ -5815,7 +5815,7 @@ ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_fun } int -ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_Initializer (long) +ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_Initializer (size_t) { ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_function_pointer = ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_function; @@ -5824,7 +5824,7 @@ ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_Ini } static int ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = - ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_Initializer)); + ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, ImplementationRepository__TAO_ServerInformationIterator_Proxy_Broker_Factory_Initializer)); /////////////////////////////////////////////////////////////////////// diff --git a/TAO/tao/PortableServer/Key_Adapters.cpp b/TAO/tao/PortableServer/Key_Adapters.cpp index 2400e3405c6..1cae96bc389 100644 --- a/TAO/tao/PortableServer/Key_Adapters.cpp +++ b/TAO/tao/PortableServer/Key_Adapters.cpp @@ -50,7 +50,7 @@ TAO_Ignore_Original_Key_Adapter::encode (const PortableServer::ObjectId &origina size_t active_key_size = active_key.size (); // Resize to accommodate both the original data and the new active key. - modified_key.length (active_key_size); + modified_key.length (ACE_static_cast (CORBA::ULong, active_key_size)); // Copy active key data into user key. active_key.encode (modified_key.get_buffer ()); @@ -96,7 +96,9 @@ TAO_Preserve_Original_Key_Adapter::encode (const PortableServer::ObjectId &origi size_t active_key_size = active_key.size (); // Resize to accommodate both the original data and the new active key. - modified_key.length (active_key_size + original_key.length ()); + modified_key.length (ACE_static_cast (CORBA::ULong, + active_key_size) + + original_key.length ()); // Copy active key data into user key. active_key.encode (modified_key.get_buffer ()); @@ -129,8 +131,10 @@ TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modif size_t active_key_size = ACE_Active_Map_Manager_Key::size (); // Smartly copy all the data; <original_key does not own the data>. - original_key.replace (modified_key.maximum () - active_key_size, - modified_key.length () - active_key_size, + original_key.replace (ACE_static_cast (CORBA::ULong, + modified_key.maximum () - active_key_size), + ACE_static_cast (CORBA::ULong, + modified_key.length () - active_key_size), ACE_const_cast (CORBA::Octet *, modified_key.get_buffer ()) + active_key_size, 0); diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp index 3438e39cd4b..3c8ec33bc85 100644 --- a/TAO/tao/PortableServer/Object_Adapter.cpp +++ b/TAO/tao/PortableServer/Object_Adapter.cpp @@ -82,7 +82,7 @@ ACE_TIMEPROBE_EVENT_DESCRIPTIONS (TAO_Object_Adapter_Timeprobe_Description, #endif /* ACE_ENABLE_TIMEPROBES */ /* static */ -size_t TAO_Object_Adapter::transient_poa_name_size_ = 0; +CORBA::ULong TAO_Object_Adapter::transient_poa_name_size_ = 0; void TAO_Object_Adapter::set_transient_poa_name_size (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters) @@ -104,7 +104,8 @@ TAO_Object_Adapter::set_transient_poa_name_size (const TAO_Server_Strategy_Facto case TAO_ACTIVE_DEMUX: default: TAO_Object_Adapter::transient_poa_name_size_ = - ACE_Active_Map_Manager_Key::size (); + ACE_static_cast (CORBA::ULong, + ACE_Active_Map_Manager_Key::size ()); break; } } diff --git a/TAO/tao/PortableServer/Object_Adapter.h b/TAO/tao/PortableServer/Object_Adapter.h index 959ea87efc3..2cd2e45d382 100644 --- a/TAO/tao/PortableServer/Object_Adapter.h +++ b/TAO/tao/PortableServer/Object_Adapter.h @@ -541,7 +541,7 @@ public: protected: - static size_t transient_poa_name_size_; + static CORBA::ULong transient_poa_name_size_; static void set_transient_poa_name_size (const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters); diff --git a/TAO/tao/PortableServer/POA.cpp b/TAO/tao/PortableServer/POA.cpp index 0bb6dc61183..540c7a822f0 100644 --- a/TAO/tao/PortableServer/POA.cpp +++ b/TAO/tao/PortableServer/POA.cpp @@ -869,13 +869,14 @@ TAO_POA::the_children_i (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { PortableServer::POAList_var children; - + CORBA::ULong child_current = ACE_static_cast (CORBA::ULong, + this->children_.current_size ()); ACE_NEW_THROW_EX (children, - PortableServer::POAList (this->children_.current_size ()), + PortableServer::POAList (child_current), CORBA::NO_MEMORY ()); ACE_CHECK_RETURN (0); - children->length (this->children_.current_size ()); + children->length (child_current); CORBA::ULong index = 0; for (CHILDREN::iterator iterator = this->children_.begin (); @@ -2983,7 +2984,9 @@ TAO_POA::parse_key (const TAO::ObjectKey &key, else if (is_system_id) { // System ids have fixed size. - poa_name_size = key.length () - starting_at - TAO_Active_Object_Map::system_id_size (); + poa_name_size = ACE_static_cast (CORBA::ULong, + key.length () - starting_at - + TAO_Active_Object_Map::system_id_size ()); } else { @@ -3189,8 +3192,8 @@ TAO_POA::is_poa_generated_id (const PortableServer::ObjectId &id) void TAO_POA::set_folded_name (void) { - CORBA::ULong length = 0; - CORBA::ULong parent_length = 0; + size_t length = 0; + size_t parent_length = 0; if (this->parent_ != 0) { @@ -3201,7 +3204,7 @@ TAO_POA::set_folded_name (void) length += this->name_.length (); length += TAO_POA::name_separator_length (); - this->folded_name_.length (length); + this->folded_name_.length (ACE_static_cast (CORBA::ULong, length)); CORBA::Octet *folded_name_buffer = this->folded_name_.get_buffer (); if (this->parent_ != 0) @@ -3226,7 +3229,8 @@ TAO_POA::string_to_ObjectId (const char *string) // We DO NOT include the zero terminator, as this is simply an // artifact of the way strings are stored in C. // - CORBA::ULong buffer_size = ACE_OS::strlen (string); + CORBA::ULong buffer_size = ACE_static_cast (CORBA::ULong, + ACE_OS::strlen (string)); // Create the buffer for the Id CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (buffer_size); @@ -3278,7 +3282,7 @@ TAO_POA::wstring_to_ObjectId (const CORBA::WChar *string) // CORBA::ULong string_length = ACE_OS::wslen (string); - size_t buffer_size = string_length * sizeof (CORBA::WChar); + CORBA::ULong buffer_size = string_length * sizeof (CORBA::WChar); // Create the buffer for the Id CORBA::Octet *buffer = PortableServer::ObjectId::allocbuf (buffer_size); @@ -3761,7 +3765,7 @@ TAO_POA::create_stub_object (const TAO::ObjectKey &object_key, // profiles than there are endpoints. In some cases, there can be // less profiles than endpoints. int result = - mprofile.set (profile_count); + mprofile.set (ACE_static_cast (CORBA::ULong, profile_count)); if (result == -1) error = 1; diff --git a/TAO/tao/PortableServer/POAManager.i b/TAO/tao/PortableServer/POAManager.i index 060a02f39dc..ecea68f638b 100644 --- a/TAO/tao/PortableServer/POAManager.i +++ b/TAO/tao/PortableServer/POAManager.i @@ -107,11 +107,13 @@ TAO_POA_Manager::generate_manager_id (void) const if (sizeof (this) == 4) // 32 bit address id = - ACE_reinterpret_cast (unsigned long, this); + ACE_static_cast (PortableInterceptor::AdapterManagerId, + ACE_reinterpret_cast (ptr_arith_t, this)); else if (sizeof (this) == 8) // 64 bit address -- use lower 32 bits id = - ACE_reinterpret_cast (unsigned long, this) & 0xFFFFFFFFu; + ACE_static_cast (PortableInterceptor::AdapterManagerId, + ACE_reinterpret_cast (ptr_arith_t, this) & 0xFFFFFFFFu); // @@ If we ever hit a platform where neither of the above cases are // satisfied, we're up the creek! diff --git a/TAO/tao/PortableServer/PolicyS.cpp b/TAO/tao/PortableServer/PolicyS.cpp index e02639fbedd..75f6bf0dc67 100644 --- a/TAO/tao/PortableServer/PolicyS.cpp +++ b/TAO/tao/PortableServer/PolicyS.cpp @@ -700,7 +700,7 @@ CORBA__TAO_Policy_Proxy_Broker_Factory_function (CORBA::Object_ptr obj) } int -CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (long) +CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (size_t) { CORBA__TAO_Policy_Proxy_Broker_Factory_function_pointer = CORBA__TAO_Policy_Proxy_Broker_Factory_function; @@ -709,7 +709,7 @@ CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (long) } static int CORBA__TAO_Policy_Proxy_Broker_Stub_Factory_Initializer_Scarecrow = - CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer)); + CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, CORBA__TAO_Policy_Proxy_Broker_Factory_Initializer)); /////////////////////////////////////////////////////////////////////// diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index 32b3f9b5bf1..b29e45af47a 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -202,7 +202,8 @@ void TAO_ServantBase::synchronous_upcall_dispatch (TAO_ServerRequest &req, } // Fetch the skeleton for this operation - if (this->_find (opname, skel, req.operation_length()) == -1) + if (this->_find (opname, skel, + ACE_static_cast (unsigned int, req.operation_length())) == -1) { ACE_THROW (CORBA::BAD_OPERATION ()); } @@ -287,7 +288,8 @@ void TAO_ServantBase::asynchronous_upcall_dispatch (TAO_ServerRequest &req, } // Fetch the skeleton for this operation - if (this->_find (opname, skel, req.operation_length()) == -1) + if (this->_find (opname, skel, + ACE_static_cast (unsigned int, req.operation_length())) == -1) { ACE_THROW (CORBA::BAD_OPERATION ()); } diff --git a/TAO/tao/PortableServer/Servant_Base.i b/TAO/tao/PortableServer/Servant_Base.i index e98c343b561..4bb0cc01dec 100644 --- a/TAO/tao/PortableServer/Servant_Base.i +++ b/TAO/tao/PortableServer/Servant_Base.i @@ -3,7 +3,8 @@ ACE_INLINE u_long TAO_Servant_Hash::operator () (PortableServer::Servant servant) const { - return u_long (servant); + return ACE_static_cast (u_long, + ACE_reinterpret_cast (ptr_arith_t, servant)); } ACE_INLINE TAO_Stub * diff --git a/TAO/tao/PortableServer/ServerRequestInfo.cpp b/TAO/tao/PortableServer/ServerRequestInfo.cpp index 183191797d3..c9c0b89e82c 100644 --- a/TAO/tao/PortableServer/ServerRequestInfo.cpp +++ b/TAO/tao/PortableServer/ServerRequestInfo.cpp @@ -54,13 +54,14 @@ TAO_ServerRequestInfo::request_id (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) // 64-bit platforms. if (sizeof (this) == 4) // 32 bit address - id = - ACE_reinterpret_cast (unsigned long, &(this->server_request_)); + id = ACE_static_cast (CORBA::ULong, + ACE_reinterpret_cast (ptr_arith_t, + &(this->server_request_))); else if (sizeof (this) == 8) // 64 bit address -- use lower 32 bits - id = - ACE_reinterpret_cast (unsigned long, - &(this->server_request_)) & 0xFFFFFFFFu; + id = ACE_static_cast (CORBA::ULong, + ACE_reinterpret_cast (ptr_arith_t, + &(this->server_request_)) & 0xFFFFFFFFu); else // @@ Rather than fallback on the GIOP request ID, we should use diff --git a/TAO/tao/PortableServer/Strategized_Object_Proxy_Broker.cpp b/TAO/tao/PortableServer/Strategized_Object_Proxy_Broker.cpp index 46779d234b7..a8b67ef4cdf 100644 --- a/TAO/tao/PortableServer/Strategized_Object_Proxy_Broker.cpp +++ b/TAO/tao/PortableServer/Strategized_Object_Proxy_Broker.cpp @@ -101,7 +101,7 @@ TAO_Object_Proxy_Broker * _TAO_collocation_Object_Proxy_Broker_Factory ( return the_tao_strategized_object_proxy_broker (); } -int _TAO_collocation_Object_Proxy_Broker_Factory_Initializer (long dummy) +int _TAO_collocation_Object_Proxy_Broker_Factory_Initializer (size_t dummy) { ACE_UNUSED_ARG (dummy); @@ -113,5 +113,5 @@ int _TAO_collocation_Object_Proxy_Broker_Factory_Initializer (long dummy) static int _TAO_collocation_Object_Proxy_Broker_Factory_Initializer_Scarecrow = -_TAO_collocation_Object_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, +_TAO_collocation_Object_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, _TAO_collocation_Object_Proxy_Broker_Factory_Initializer)); |