summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-04-30 12:31:02 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-04-30 12:31:02 +0000
commit6a49e64da69c48aa6ce7c306a5ae84f319e7eea0 (patch)
tree0918899fe823d8adb5a86c5db91f4bf8e43a1086 /TAO/tao
parentf23636bb09a053f540647572b790d7c7ceae437d (diff)
downloadATCD-6a49e64da69c48aa6ce7c306a5ae84f319e7eea0.tar.gz
ChangeLogTag: Wed Apr 30 07:26:37 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/Asynch_Queued_Message.cpp3
-rw-r--r--TAO/tao/CDR_Encaps_Codec.cpp4
-rw-r--r--TAO/tao/CORBALOC_Parser.cpp8
-rw-r--r--TAO/tao/ClientRequestInfo_i.cpp15
-rw-r--r--TAO/tao/Codeset_Manager.cpp3
-rw-r--r--TAO/tao/Connection_Handler.cpp4
-rw-r--r--TAO/tao/Domain/DomainS.cpp8
-rw-r--r--TAO/tao/DynamicAny/DynArray_i.cpp16
-rw-r--r--TAO/tao/DynamicAny/DynSequence_i.cpp6
-rw-r--r--TAO/tao/DynamicAny/DynStruct_i.cpp3
-rw-r--r--TAO/tao/DynamicInterface/DII_Invocation.inl3
-rw-r--r--TAO/tao/DynamicInterface/Request.cpp6
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.cpp3
-rw-r--r--TAO/tao/Exception.cpp3
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp3
-rw-r--r--TAO/tao/GIOP_Message_Lite.cpp3
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp19
-rw-r--r--TAO/tao/IIOP_Acceptor.h2
-rw-r--r--TAO/tao/IIOP_Connection_Handler.cpp4
-rw-r--r--TAO/tao/IIOP_Profile.cpp34
-rw-r--r--TAO/tao/IIOP_Profile.h4
-rw-r--r--TAO/tao/Leader_Follower.cpp2
-rw-r--r--TAO/tao/LocalObject.cpp3
-rw-r--r--TAO/tao/MCAST_Parser.cpp21
-rw-r--r--TAO/tao/Messaging/MessagingS.cpp4
-rw-r--r--TAO/tao/ORB.cpp10
-rw-r--r--TAO/tao/ORB_Core.cpp13
-rw-r--r--TAO/tao/Object.cpp3
-rw-r--r--TAO/tao/PortableServer/ImR_LocatorS.cpp4
-rw-r--r--TAO/tao/PortableServer/ImplRepoS.cpp12
-rw-r--r--TAO/tao/PortableServer/Key_Adapters.cpp12
-rw-r--r--TAO/tao/PortableServer/Object_Adapter.cpp5
-rw-r--r--TAO/tao/PortableServer/Object_Adapter.h2
-rw-r--r--TAO/tao/PortableServer/POA.cpp24
-rw-r--r--TAO/tao/PortableServer/POAManager.i6
-rw-r--r--TAO/tao/PortableServer/PolicyS.cpp4
-rw-r--r--TAO/tao/PortableServer/Servant_Base.cpp6
-rw-r--r--TAO/tao/PortableServer/Servant_Base.i3
-rw-r--r--TAO/tao/PortableServer/ServerRequestInfo.cpp11
-rw-r--r--TAO/tao/PortableServer/Strategized_Object_Proxy_Broker.cpp4
-rw-r--r--TAO/tao/Profile.cpp14
-rw-r--r--TAO/tao/Profile.h4
-rw-r--r--TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp4
-rw-r--r--TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp2
-rw-r--r--TAO/tao/RTPortableServer/RT_POA.cpp2
-rw-r--r--TAO/tao/Service_Context.cpp8
-rw-r--r--TAO/tao/Strategies/DIOP_Acceptor.cpp7
-rw-r--r--TAO/tao/Strategies/DIOP_Acceptor.h2
-rw-r--r--TAO/tao/Strategies/DIOP_Connection_Handler.cpp6
-rw-r--r--TAO/tao/Strategies/DIOP_Profile.cpp41
-rw-r--r--TAO/tao/Strategies/DIOP_Profile.h4
-rw-r--r--TAO/tao/Strategies/SHMIOP_Acceptor.cpp3
-rw-r--r--TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp4
-rw-r--r--TAO/tao/Strategies/SHMIOP_Profile.cpp41
-rw-r--r--TAO/tao/Strategies/SHMIOP_Profile.h4
-rw-r--r--TAO/tao/Strategies/UIOP_Connection_Handler.cpp4
-rw-r--r--TAO/tao/Strategies/UIOP_Profile.cpp2
-rw-r--r--TAO/tao/Strategies/UIOP_Profile.h4
-rw-r--r--TAO/tao/Synch_Queued_Message.cpp2
-rw-r--r--TAO/tao/TAO_Server_Request.h2
-rw-r--r--TAO/tao/TAO_Server_Request.i2
-rw-r--r--TAO/tao/Tagged_Components.cpp4
-rw-r--r--TAO/tao/Transport.cpp4
-rw-r--r--TAO/tao/Transport.h6
-rw-r--r--TAO/tao/Transport.inl4
-rw-r--r--TAO/tao/Transport_Cache_Manager.cpp2
-rw-r--r--TAO/tao/Typecode.cpp5
-rw-r--r--TAO/tao/corbafwd.cpp2
-rw-r--r--TAO/tao/default_resource.cpp2
-rw-r--r--TAO/tao/default_resource.h2
-rw-r--r--TAO/tao/params.cpp4
71 files changed, 273 insertions, 227 deletions
diff --git a/TAO/tao/Asynch_Queued_Message.cpp b/TAO/tao/Asynch_Queued_Message.cpp
index b12a57221d6..09d233cdde5 100644
--- a/TAO/tao/Asynch_Queued_Message.cpp
+++ b/TAO/tao/Asynch_Queued_Message.cpp
@@ -70,7 +70,8 @@ TAO_Asynch_Queued_Message::fill_iov (int iovcnt_max,
ACE_UNUSED_ARG (iovcnt_max); // not used if ACE_ASSERT() is empty
iov[iovcnt].iov_base = this->buffer_ + this->offset_;
- iov[iovcnt].iov_len = this->size_ - this->offset_;
+ iov[iovcnt].iov_len = ACE_static_cast (u_long,
+ this->size_ - this->offset_);
iovcnt++;
}
diff --git a/TAO/tao/CDR_Encaps_Codec.cpp b/TAO/tao/CDR_Encaps_Codec.cpp
index 2308492f8fb..81db628886e 100644
--- a/TAO/tao/CDR_Encaps_Codec.cpp
+++ b/TAO/tao/CDR_Encaps_Codec.cpp
@@ -65,7 +65,7 @@ TAO_CDR_Encaps_Codec::encode (const CORBA::Any & data
CORBA::OctetSeq_var safe_octet_seq = octet_seq;
- octet_seq->length (cdr.total_length ());
+ octet_seq->length (ACE_static_cast (CORBA::ULong, cdr.total_length ()));
CORBA::Octet *buf = octet_seq->get_buffer ();
for (const ACE_Message_Block *i = cdr.begin ();
@@ -208,7 +208,7 @@ TAO_CDR_Encaps_Codec::encode_value (const CORBA::Any & data
CORBA::OctetSeq_var safe_octet_seq = octet_seq;
- octet_seq->length (cdr.total_length ());
+ octet_seq->length (ACE_static_cast (CORBA::ULong, cdr.total_length ()));
CORBA::Octet *buf = octet_seq->get_buffer ();
for (const ACE_Message_Block *i = cdr.begin ();
diff --git a/TAO/tao/CORBALOC_Parser.cpp b/TAO/tao/CORBALOC_Parser.cpp
index ae8759d14ca..06cc0ddf32c 100644
--- a/TAO/tao/CORBALOC_Parser.cpp
+++ b/TAO/tao/CORBALOC_Parser.cpp
@@ -116,7 +116,8 @@ TAO_CORBALOC_Parser::assign_key_string (char *& cloc_name_ptr,
+ 1 // Object key separator
+ 3 // "://"
+ sizeof (def_port) - 1
- + key_string.length ());
+ + ACE_static_cast (CORBA::ULong,
+ key_string.length ()));
// Copy the default <iiop> prefix.
ACE_OS::strcpy (end_point.inout (),
@@ -137,7 +138,8 @@ TAO_CORBALOC_Parser::assign_key_string (char *& cloc_name_ptr,
+ 1 // Object key separator
+ 3 // "://"
+ sizeof (def_port) - 1
- + key_string.length ());
+ + ACE_static_cast (CORBA::ULong,
+ key_string.length ()));
ACE_CString prot_name = cloc_name_cstring.substring (0,
pos_colon);
@@ -229,7 +231,7 @@ TAO_CORBALOC_Parser::parse_string_assign_helper (
CORBA::ULong length;
while (cloc_name_ptr != 0)
{
- length = ACE_OS::strlen (cloc_name_ptr);
+ length = ACE_static_cast (CORBA::ULong, ACE_OS::strlen (cloc_name_ptr));
// Forms the endpoint and calls the mprofile_helper.
this->assign_key_string (cloc_name_ptr,
key_string,
diff --git a/TAO/tao/ClientRequestInfo_i.cpp b/TAO/tao/ClientRequestInfo_i.cpp
index bf4eaf1258c..e2314ddfc3b 100644
--- a/TAO/tao/ClientRequestInfo_i.cpp
+++ b/TAO/tao/ClientRequestInfo_i.cpp
@@ -374,7 +374,9 @@ TAO_ClientRequestInfo_i::request_id (ACE_ENV_SINGLE_ARG_DECL)
// 32 bit address
if (sizeof (this) == 4)
- id = ACE_reinterpret_cast (unsigned long, this->invocation_);
+ id = ACE_static_cast (CORBA::ULong,
+ ACE_reinterpret_cast (ptr_arith_t,
+ this->invocation_));
// 64 bit address -- bits 8 through 39 (see notes above!)
// In this case, we make sure this object is large enough to safely
@@ -383,13 +385,16 @@ TAO_ClientRequestInfo_i::request_id (ACE_ENV_SINGLE_ARG_DECL)
else if (sizeof (this) == 8
&& sizeof (*(this->invocation_)) > 256 /* 2 << 8 */)
id =
- (ACE_reinterpret_cast (unsigned long,
- this->invocation_) >> 8) & 0xFFFFFFFFu;
+ (ACE_static_cast (CORBA::ULong,
+ ACE_reinterpret_cast (ptr_arith_t,
+ this->invocation_)) >> 8) & 0xFFFFFFFFu;
// 64 bit address -- lower 32 bits
else if (sizeof (this) == 8)
- id = ACE_reinterpret_cast (unsigned long,
- this->invocation_) & 0xFFFFFFFFu;
+ id = ACE_static_cast (CORBA::ULong,
+ ACE_reinterpret_cast (ptr_arith_t,
+ this->invocation_)) &
+ 0xFFFFFFFFu;
// @@ The following request ID generator prevents the
// PortableInterceptor::ClientRequestInterceptor::send_request()
diff --git a/TAO/tao/Codeset_Manager.cpp b/TAO/tao/Codeset_Manager.cpp
index 0e23ba62a3b..90db073b321 100644
--- a/TAO/tao/Codeset_Manager.cpp
+++ b/TAO/tao/Codeset_Manager.cpp
@@ -309,7 +309,8 @@ TAO_Codeset_Manager::init_codeset_factories_i (TAO_CodesetFactorySet& factset,
TAO_CodesetFactorySetItor iter = factset.begin ();
CONV_FRAME::CodeSetId ncs = cs_comp.native_code_set;
- cs_comp.conversion_code_sets.length(factset.size());
+ cs_comp.conversion_code_sets.length(ACE_static_cast (CORBA::ULong,
+ factset.size()));
CORBA::ULong index;
for (index=0; iter != end; iter++)
diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp
index 60f9b434550..6fd4351e45f 100644
--- a/TAO/tao/Connection_Handler.cpp
+++ b/TAO/tao/Connection_Handler.cpp
@@ -296,7 +296,7 @@ TAO_Connection_Handler::handle_input_eh (
// Grab the transport id now and use the cached value for printing
// since the transport could dissappear by the time the thread
// returns.
- int t_id =
+ size_t t_id =
this->transport ()->id ();
@@ -388,7 +388,7 @@ TAO_Connection_Handler::close_connection_eh (ACE_Event_Handler * eh)
return 0;
}
- int id = -1;
+ size_t id = 0;
{
ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, 0);
diff --git a/TAO/tao/Domain/DomainS.cpp b/TAO/tao/Domain/DomainS.cpp
index 7df5944b374..4dadf27c274 100644
--- a/TAO/tao/Domain/DomainS.cpp
+++ b/TAO/tao/Domain/DomainS.cpp
@@ -439,7 +439,7 @@ CORBA__TAO_DomainManager_Proxy_Broker_Factory_function (CORBA::Object_ptr obj)
}
int
-CORBA__TAO_DomainManager_Proxy_Broker_Factory_Initializer (long)
+CORBA__TAO_DomainManager_Proxy_Broker_Factory_Initializer (size_t)
{
CORBA__TAO_DomainManager_Proxy_Broker_Factory_function_pointer =
CORBA__TAO_DomainManager_Proxy_Broker_Factory_function;
@@ -448,7 +448,7 @@ CORBA__TAO_DomainManager_Proxy_Broker_Factory_Initializer (long)
}
static int CORBA__TAO_DomainManager_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
- CORBA__TAO_DomainManager_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, CORBA__TAO_DomainManager_Proxy_Broker_Factory_Initializer));
+ CORBA__TAO_DomainManager_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, CORBA__TAO_DomainManager_Proxy_Broker_Factory_Initializer));
///////////////////////////////////////////////////////////////////////
@@ -1295,7 +1295,7 @@ CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_function (CORBA::Object_ptr o
}
int
-CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_Initializer (long)
+CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_Initializer (size_t)
{
CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_function_pointer =
CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_function;
@@ -1304,7 +1304,7 @@ CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_Initializer (long)
}
static int CORBA__TAO_ConstructionPolicy_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
- CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_Initializer));
+ CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, CORBA__TAO_ConstructionPolicy_Proxy_Broker_Factory_Initializer));
///////////////////////////////////////////////////////////////////////
diff --git a/TAO/tao/DynamicAny/DynArray_i.cpp b/TAO/tao/DynamicAny/DynArray_i.cpp
index 4516edbbf22..7064c1f291a 100644
--- a/TAO/tao/DynamicAny/DynArray_i.cpp
+++ b/TAO/tao/DynamicAny/DynArray_i.cpp
@@ -26,7 +26,8 @@ TAO_DynArray_i::init_common (void)
this->has_components_ = 1;
this->destroyed_ = 0;
this->current_position_ = 0;
- this->component_count_ = this->da_members_.size ();
+ this->component_count_ = ACE_static_cast (CORBA::ULong,
+ this->da_members_.size ());
}
void
@@ -235,7 +236,8 @@ TAO_DynArray_i::get_elements (ACE_ENV_SINGLE_ARG_DECL)
0);
}
- CORBA::ULong length = this->da_members_.size ();
+ CORBA::ULong length = ACE_static_cast (CORBA::ULong,
+ this->da_members_.size ());
DynamicAny::AnySeq *elements = 0;
ACE_NEW_THROW_EX (elements,
@@ -364,7 +366,8 @@ TAO_DynArray_i::set_elements_as_dyn_any (
ACE_THROW (CORBA::OBJECT_NOT_EXIST ());
}
- CORBA::ULong length = this->da_members_.size ();
+ CORBA::ULong length = ACE_static_cast (CORBA::ULong,
+ this->da_members_.size ());
if (values.length () != length)
{
@@ -437,7 +440,8 @@ TAO_DynArray_i::from_any (const CORBA::Any& any
TAO_InputCDR cdr (mb,
any._tao_byte_order ());
- CORBA::ULong length = this->da_members_.size ();
+ CORBA::ULong length = ACE_static_cast (CORBA::ULong,
+ this->da_members_.size ());
CORBA::ULong arg_length = this->get_tc_length (tc.in ()
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
@@ -500,9 +504,9 @@ TAO_DynArray_i::to_any (ACE_ENV_SINGLE_ARG_DECL)
TAO_OutputCDR out_cdr;
CORBA::Any_var field_any;
- CORBA::ULong length = this->da_members_.size ();
+ size_t length = this->da_members_.size ();
- for (CORBA::ULong i = 0; i < length; ++i)
+ for (size_t i = 0; i < length; ++i)
{
// Recursive step.
field_any = this->da_members_[i]->to_any (ACE_ENV_SINGLE_ARG_PARAMETER);
diff --git a/TAO/tao/DynamicAny/DynSequence_i.cpp b/TAO/tao/DynamicAny/DynSequence_i.cpp
index 67674cdfb4d..e8c3efbf79f 100644
--- a/TAO/tao/DynamicAny/DynSequence_i.cpp
+++ b/TAO/tao/DynamicAny/DynSequence_i.cpp
@@ -26,7 +26,8 @@ TAO_DynSequence_i::init_common (void)
this->has_components_ = 1;
this->destroyed_ = 0;
this->current_position_ = -1;
- this->component_count_ = this->da_members_.size ();
+ this->component_count_ = ACE_static_cast (CORBA::ULong,
+ this->da_members_.size ());
}
void
@@ -305,7 +306,8 @@ TAO_DynSequence_i::get_elements (ACE_ENV_SINGLE_ARG_DECL)
0);
}
- CORBA::ULong length = this->da_members_.size ();
+ CORBA::ULong length = ACE_static_cast (CORBA::ULong,
+ this->da_members_.size ());
DynamicAny::AnySeq *elements;
ACE_NEW_THROW_EX (elements,
diff --git a/TAO/tao/DynamicAny/DynStruct_i.cpp b/TAO/tao/DynamicAny/DynStruct_i.cpp
index b633d0c0819..c74c7b6fe7c 100644
--- a/TAO/tao/DynamicAny/DynStruct_i.cpp
+++ b/TAO/tao/DynamicAny/DynStruct_i.cpp
@@ -41,7 +41,8 @@ TAO_DynStruct_i::init_common (void)
this->container_is_destroying_ = 0;
this->has_components_ = 1;
this->destroyed_ = 0;
- this->component_count_ = this->da_members_.size ();
+ this->component_count_ = ACE_static_cast (CORBA::ULong,
+ this->da_members_.size ());
this->current_position_ = this->component_count_ ? 0 : -1;
}
diff --git a/TAO/tao/DynamicInterface/DII_Invocation.inl b/TAO/tao/DynamicInterface/DII_Invocation.inl
index 0ea9c1448a4..c32989bddc1 100644
--- a/TAO/tao/DynamicInterface/DII_Invocation.inl
+++ b/TAO/tao/DynamicInterface/DII_Invocation.inl
@@ -31,7 +31,8 @@ TAO_GIOP_DII_Deferred_Invocation::TAO_GIOP_DII_Deferred_Invocation (
)
: TAO_GIOP_Asynch_Invocation (stub,
req->operation (),
- ACE_OS::strlen (req->operation ()),
+ ACE_static_cast (CORBA::ULong,
+ ACE_OS::strlen (req->operation ())),
argument_flag,
orb_core,
byte_order)
diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp
index 5e7b94ec360..0cec438d8ad 100644
--- a/TAO/tao/DynamicInterface/Request.cpp
+++ b/TAO/tao/DynamicInterface/Request.cpp
@@ -148,7 +148,8 @@ CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL)
TAO_GIOP_DII_Invocation call (this->target_->_stubobj (),
this->opname_,
- ACE_OS::strlen (this->opname_),
+ ACE_static_cast (CORBA::ULong,
+ ACE_OS::strlen (this->opname_)),
argument_flag,
this->orb_->orb_core (),
this,
@@ -268,7 +269,8 @@ CORBA::Request::send_oneway (ACE_ENV_SINGLE_ARG_DECL)
TAO_GIOP_Oneway_Invocation call (this->target_->_stubobj (),
this->opname_,
- ACE_OS::strlen (this->opname_),
+ ACE_static_cast (CORBA::ULong,
+ ACE_OS::strlen (this->opname_)),
argument_flag,
this->orb_->orb_core (),
this->byte_order_);
diff --git a/TAO/tao/DynamicInterface/Server_Request.cpp b/TAO/tao/DynamicInterface/Server_Request.cpp
index f991bbe90b2..8fc8bcb248e 100644
--- a/TAO/tao/DynamicInterface/Server_Request.cpp
+++ b/TAO/tao/DynamicInterface/Server_Request.cpp
@@ -223,7 +223,8 @@ CORBA::ServerRequest::gateway_exception_reply (ACE_CString &raw_exception)
// to the original source of the reply.
this->orb_server_request_.outgoing ().write_octet_array (
ACE_reinterpret_cast (const CORBA::Octet *, raw_exception.fast_rep ()),
- raw_exception.length () + ACE_CDR::MAX_ALIGNMENT
+ ACE_static_cast (CORBA::ULong,
+ raw_exception.length () + ACE_CDR::MAX_ALIGNMENT)
);
// This will prevent the marshaling of any parameters into this reply.
diff --git a/TAO/tao/Exception.cpp b/TAO/tao/Exception.cpp
index 8ef7aad212f..25ddb7bfe30 100644
--- a/TAO/tao/Exception.cpp
+++ b/TAO/tao/Exception.cpp
@@ -971,7 +971,8 @@ TAO_Exceptions::make_standard_typecode (CORBA::TypeCode_ptr &tcp,
const char suffix[] = ":1.0";
char * full_id =
CORBA::string_alloc (sizeof prefix
- + ACE_OS_String::strlen (name)
+ + ACE_static_cast (CORBA::ULong,
+ ACE_OS_String::strlen (name))
+ sizeof suffix);
CORBA::String_var safe_full_id = full_id;
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index 96768eed919..905df4e1167 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -232,7 +232,8 @@ TAO_GIOP_Message_Base::format_message (TAO_OutputCDR &stream)
// this particular environment and that isn't handled by the
// networking infrastructure (e.g., IPSEC).
- CORBA::ULong bodylen = total_len - TAO_GIOP_MESSAGE_HEADER_LEN;
+ CORBA::ULong bodylen = ACE_static_cast (CORBA::ULong,
+ total_len - TAO_GIOP_MESSAGE_HEADER_LEN);
#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
*ACE_reinterpret_cast (CORBA::ULong *, buf +
diff --git a/TAO/tao/GIOP_Message_Lite.cpp b/TAO/tao/GIOP_Message_Lite.cpp
index e30a083a8dc..36308018552 100644
--- a/TAO/tao/GIOP_Message_Lite.cpp
+++ b/TAO/tao/GIOP_Message_Lite.cpp
@@ -192,7 +192,8 @@ TAO_GIOP_Message_Lite::format_message (TAO_OutputCDR &stream)
// this particular environment and that isn't handled by the
// networking infrastructure (e.g., IPSEC).
- CORBA::ULong bodylen = total_len - header_len;
+ CORBA::ULong bodylen = ACE_static_cast (CORBA::ULong,
+ total_len - header_len);
#if !defined (ACE_ENABLE_SWAP_ON_WRITE)
*ACE_reinterpret_cast (CORBA::ULong *, buf + offset) = bodylen;
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index 3ebf8db8842..f729d70c94c 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -77,7 +77,7 @@ TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor (void)
delete [] this->addrs_;
- for (size_t i = 0; i < this->endpoint_count_; ++i)
+ for (CORBA::ULong i = 0; i < this->endpoint_count_; ++i)
CORBA::string_free (this->hosts_[i]);
delete [] this->hosts_;
@@ -118,7 +118,7 @@ TAO_IIOP_Acceptor::create_new_profile (const TAO::ObjectKey &object_key,
return -1;
// Create a profile for each acceptor endpoint.
- for (size_t i = 0; i < this->endpoint_count_; ++i)
+ for (CORBA::ULong i = 0; i < this->endpoint_count_; ++i)
{
TAO_IIOP_Profile *pfile = 0;
ACE_NEW_RETURN (pfile,
@@ -159,7 +159,7 @@ TAO_IIOP_Acceptor::create_shared_profile (const TAO::ObjectKey &object_key,
TAO_MProfile &mprofile,
CORBA::Short priority)
{
- size_t index = 0;
+ CORBA::ULong index = 0;
TAO_Profile *pfile = 0;
TAO_IIOP_Profile *iiop_profile = 0;
@@ -238,7 +238,7 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Endpoint *endpoint)
if (endp == 0)
return 0;
- for (size_t i = 0; i < this->endpoint_count_; ++i)
+ for (CORBA::ULong i = 0; i < this->endpoint_count_; ++i)
{
// compare the port and host name. Please do *NOT* optimize
// this code by comparing the IP address instead. That would
@@ -543,7 +543,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr,
// the same port. This is how a wildcard socket bind() is supposed
// to work.
u_short port = address.get_port_number ();
- for (size_t j = 0; j < this->endpoint_count_; ++j)
+ for (CORBA::ULong j = 0; j < this->endpoint_count_; ++j)
this->addrs_[j].set_port_number (port, 1);
(void) this->base_acceptor_.acceptor().enable (ACE_CLOEXEC);
@@ -553,7 +553,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr,
if (TAO_debug_level > 5)
{
- for (size_t i = 0; i < this->endpoint_count_; ++i)
+ for (CORBA::ULong i = 0; i < this->endpoint_count_; ++i)
{
ACE_DEBUG ((LM_DEBUG,
ACE_LIB_TEXT ("\nTAO (%P|%t) IIOP_Acceptor::open_i - ")
@@ -691,9 +691,9 @@ TAO_IIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core)
// in the list of interfaces to query for a hostname, otherwise
// exclude it from the list.
if (if_cnt == lo_cnt)
- this->endpoint_count_ = if_cnt;
+ this->endpoint_count_ = ACE_static_cast (CORBA::ULong, if_cnt);
else
- this->endpoint_count_ = if_cnt - lo_cnt;
+ this->endpoint_count_ = ACE_static_cast (CORBA::ULong, if_cnt - lo_cnt);
ACE_NEW_RETURN (this->addrs_,
ACE_INET_Addr[this->endpoint_count_],
@@ -857,7 +857,8 @@ TAO_IIOP_Acceptor::parse_options (const char *str)
if (j < option_count - 1)
end = options.find (option_delimiter, begin);
else
- end = len - begin; // Handle last endpoint differently
+ end = ACE_static_cast (CORBA::ULong, len)
+ - begin; // Handle last endpoint differently
if (end == begin)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tao/IIOP_Acceptor.h b/TAO/tao/IIOP_Acceptor.h
index 266ca9f43ff..cef37ad7dad 100644
--- a/TAO/tao/IIOP_Acceptor.h
+++ b/TAO/tao/IIOP_Acceptor.h
@@ -177,7 +177,7 @@ protected:
/// The number of host names cached in the hosts_ array (equivalent
/// to the number of endpoints opened by this Acceptor).
- size_t endpoint_count_;
+ CORBA::ULong endpoint_count_;
/**
* Override the hostname used in the ORBEndPoint.
diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp
index 86b2ef8b3fe..00e341b6079 100644
--- a/TAO/tao/IIOP_Connection_Handler.cpp
+++ b/TAO/tao/IIOP_Connection_Handler.cpp
@@ -144,7 +144,7 @@ TAO_IIOP_Connection_Handler::open (void*)
// Set the id in the transport now that we're active.
// Use C-style cast b/c otherwise we get warnings on lots of compilers
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
this->state_changed (TAO_LF_Event::LFS_SUCCESS);
@@ -173,7 +173,7 @@ TAO_IIOP_Connection_Handler::activate (long flags,
// Set the id in the transport now that we're active.
// Use C-style cast b/c otherwise we get warnings on lots of compilers
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
return TAO_IIOP_SVC_HANDLER::activate (flags,
n_threads,
diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp
index b23a4e2a85b..8bd9333d8b1 100644
--- a/TAO/tao/IIOP_Profile.cpp
+++ b/TAO/tao/IIOP_Profile.cpp
@@ -263,7 +263,7 @@ TAO_IIOP_Profile::endpoint (void)
return &this->endpoint_;
}
-size_t
+CORBA::ULong
TAO_IIOP_Profile::endpoint_count (void)
{
return this->count_;
@@ -285,21 +285,21 @@ TAO_IIOP_Profile::to_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
TAO::ObjectKey::encode_sequence_to_string (key.inout(),
this->object_key_);
- u_int buflen = (8 /* "corbaloc" */ +
- 1 /* colon separator */ +
- ACE_OS::strlen (::prefix_) +
- 1 /* colon separator */ +
- 1 /* major version */ +
- 1 /* decimal point */ +
- 1 /* minor version */ +
- 1 /* `@' character */ +
- ACE_OS::strlen (this->endpoint_.host ()) +
- 1 /* colon separator */ +
- 5 /* port number */ +
- 1 /* object key separator */ +
- ACE_OS::strlen (key.in ()));
-
- char * buf = CORBA::string_alloc (buflen);
+ size_t buflen = (8 /* "corbaloc" */ +
+ 1 /* colon separator */ +
+ ACE_OS::strlen (::prefix_) +
+ 1 /* colon separator */ +
+ 1 /* major version */ +
+ 1 /* decimal point */ +
+ 1 /* minor version */ +
+ 1 /* `@' character */ +
+ ACE_OS::strlen (this->endpoint_.host ()) +
+ 1 /* colon separator */ +
+ 5 /* port number */ +
+ 1 /* object key separator */ +
+ ACE_OS::strlen (key.in ()));
+
+ char * buf = CORBA::string_alloc (ACE_static_cast (CORBA::ULong, buflen));
static const char digits [] = "0123456789";
@@ -359,7 +359,7 @@ TAO_IIOP_Profile::encode_endpoints (void)
endpoints.length (this->count_);
const TAO_IIOP_Endpoint *endpoint = &this->endpoint_;
- for (size_t i = 0;
+ for (CORBA::ULong i = 0;
i < this->count_;
++i)
{
diff --git a/TAO/tao/IIOP_Profile.h b/TAO/tao/IIOP_Profile.h
index e433714c8d0..c3e0d96d538 100644
--- a/TAO/tao/IIOP_Profile.h
+++ b/TAO/tao/IIOP_Profile.h
@@ -73,7 +73,7 @@ public:
virtual char * to_string (ACE_ENV_SINGLE_ARG_DECL);
virtual int encode_endpoints (void);
virtual TAO_Endpoint *endpoint (void);
- virtual size_t endpoint_count (void);
+ virtual CORBA::ULong endpoint_count (void);
virtual CORBA::Boolean is_equivalent (const TAO_Profile *other_profile);
virtual CORBA::ULong hash (CORBA::ULong max
ACE_ENV_ARG_DECL);
@@ -113,7 +113,7 @@ protected:
TAO_IIOP_Endpoint endpoint_;
/// Number of endpoints in the list headed by <endpoint_>.
- size_t count_;
+ CORBA::ULong count_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/Leader_Follower.cpp b/TAO/tao/Leader_Follower.cpp
index d6dc4f08275..c3008791dd9 100644
--- a/TAO/tao/Leader_Follower.cpp
+++ b/TAO/tao/Leader_Follower.cpp
@@ -188,7 +188,7 @@ TAO_Leader_Follower::wait_for_event (TAO_LF_Event *event,
// with debugging level on we are on a sticky wicket. Hopefully none
// of our users should run TAO with debugging enabled like they did
// in PathFinder
- int t_id = 0;
+ size_t t_id = 0;
if (TAO_debug_level)
t_id = transport->id ();
diff --git a/TAO/tao/LocalObject.cpp b/TAO/tao/LocalObject.cpp
index f7ce24aa71f..d9612125191 100644
--- a/TAO/tao/LocalObject.cpp
+++ b/TAO/tao/LocalObject.cpp
@@ -44,7 +44,8 @@ CORBA::LocalObject::_hash (CORBA::ULong maximum
// enough to hold an address to avoid compile-time warnings on some
// 64-bit platforms.
- CORBA::ULong hash = ACE_reinterpret_cast (unsigned long, this);
+ CORBA::ULong hash = ACE_static_cast (CORBA::ULong,
+ ACE_reinterpret_cast (ptr_arith_t, this));
return hash % maximum;
}
diff --git a/TAO/tao/MCAST_Parser.cpp b/TAO/tao/MCAST_Parser.cpp
index 61d4e7efc13..8bfb0179995 100644
--- a/TAO/tao/MCAST_Parser.cpp
+++ b/TAO/tao/MCAST_Parser.cpp
@@ -220,7 +220,8 @@ TAO_MCAST_Parser::multicast_query (char *&buf,
// The service name string.
iovp[2].iov_base = (char *) service_name;
- iovp[2].iov_len = ACE_OS::strlen (service_name) + 1;
+ iovp[2].iov_len = ACE_static_cast (u_long,
+ ACE_OS::strlen (service_name) + 1);
// Send the multicast.
result = dgram.send (iovp,
@@ -354,14 +355,11 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name)
if (pos_colon1 == 0)
{
- const char *default_addr = ACE_DEFAULT_MULTICAST_ADDR;
- this->mcast_address_ = CORBA::string_alloc (ACE_OS::strlen (default_addr));
- this->mcast_address_ = default_addr;
-
+ const char *default_addr = ACE_DEFAULT_MULTICAST_ADDR;
+ this->mcast_address_ = default_addr;
}
else
{
- this->mcast_address_ = CORBA::string_alloc (pos_colon1);
this->mcast_address_ =
mcast_name_cstring.substring (0,
pos_colon1).c_str ();
@@ -404,13 +402,10 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name)
ACE_OS_String::itoa (trial_port, default_port, 10);
- this->mcast_port_ =
- CORBA::string_alloc (ACE_OS::strlen ((const char *) default_port));
this->mcast_port_ = (const char *) default_port;
}
else
{
- this->mcast_port_ = CORBA::string_alloc (pos_colon2);
this->mcast_port_ = mcast_name_cstring.substring (0,
pos_colon2).c_str ();
}
@@ -422,7 +417,6 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name)
int pos_colon3 = mcast_name_cstring.find (':', 0);
- this->mcast_nic_ = CORBA::string_alloc (pos_colon3);
this->mcast_nic_ =
mcast_name_cstring.substring (0,
pos_colon3).c_str ();
@@ -436,13 +430,11 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name)
if (pos_colon4 == 0)
{
// And, the default TTL to be 1
- const char *default_ttl = "1";
- this->mcast_ttl_ = CORBA::string_alloc (ACE_OS::strlen (default_ttl));
+ const char *default_ttl = "1";
this->mcast_ttl_ = default_ttl;
}
else
{
- this->mcast_ttl_ = CORBA::string_alloc (pos_colon4);
this->mcast_ttl_ =
mcast_name_cstring.substring (0,
pos_colon4).c_str ();
@@ -452,9 +444,6 @@ TAO_MCAST_Parser::assign_to_variables (const char * &mcast_name)
mcast_name_cstring.length() - pos_colon4);
this->service_name_ =
- CORBA::string_alloc (mcast_name_cstring.length ());
-
- this->service_name_ =
mcast_name_cstring.substring (1,
mcast_name_cstring.length()
-1).c_str ();
diff --git a/TAO/tao/Messaging/MessagingS.cpp b/TAO/tao/Messaging/MessagingS.cpp
index c20d9a19c09..0c429cc8847 100644
--- a/TAO/tao/Messaging/MessagingS.cpp
+++ b/TAO/tao/Messaging/MessagingS.cpp
@@ -280,7 +280,7 @@ Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function (CORBA::Object_ptr obj
}
int
-Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer (long)
+Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer (size_t)
{
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function_pointer =
Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_function;
@@ -289,7 +289,7 @@ Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer (long)
}
static int Messaging__TAO_ReplyHandler_Proxy_Broker_Stub_Factory_Initializer_Scarecrow =
- Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (long, Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer));
+ Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer (ACE_reinterpret_cast (size_t, Messaging__TAO_ReplyHandler_Proxy_Broker_Factory_Initializer));
///////////////////////////////////////////////////////////////////////
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index fc9a8bee1a6..01b272760fa 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -998,13 +998,15 @@ CORBA::ORB::resolve_service (TAO_MCAST_SERVICEID mcast_service_id
10);
CORBA::String_var port_ptr =
- CORBA::string_alloc (ACE_OS::strlen ((const char *) port_char));
+ CORBA::string_alloc (ACE_static_cast (CORBA::ULong,
+ ACE_OS::strlen ((const char *) port_char)));
port_ptr = (const char *) port_char;
CORBA::String_var def_init_ref =
CORBA::string_alloc (sizeof (prefix) +
- ACE_OS::strlen (port_ptr.in ()) +
+ ACE_static_cast (CORBA::ULong,
+ ACE_OS::strlen (port_ptr.in ())) +
2);
ACE_OS::strcpy (def_init_ref.inout (), prefix);
@@ -1656,7 +1658,9 @@ CORBA::ORB::object_to_string (CORBA::Object_ptr obj
char *cp;
ACE_ALLOCATOR_RETURN (cp,
CORBA::string_alloc (sizeof ior_prefix
- + 2 * total_len),
+ + 2 *
+ ACE_static_cast (CORBA::ULong,
+ total_len)),
0);
CORBA::String_var string = cp;
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index cfa544dcc1a..e59d0d827b9 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -310,7 +310,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
long snd_sock_size = -1;
// Use TCP_NODELAY.
- size_t nodelay = 1;
+ int nodelay = 1;
// Use dotted decimal addresses
// @@ This option will be treated as a suggestion to each loaded
@@ -971,7 +971,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
10);
CORBA::String_var ns_port_ptr =
- CORBA::string_alloc (ACE_OS::strlen ((const char *) ns_port_char));
+ CORBA::string_alloc (ACE_static_cast (CORBA::ULong,
+ ACE_OS::strlen ((const char *) ns_port_char)));
ns_port_ptr = (const char *) ns_port_char;
@@ -979,7 +980,8 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL)
CORBA::String_var def_init_ref =
CORBA::string_alloc (sizeof (prefix) +
- ACE_OS::strlen (ns_port_ptr.in ()) +
+ ACE_static_cast (CORBA::ULong,
+ ACE_OS::strlen (ns_port_ptr.in ())) +
2);
ACE_OS::strcpy (def_init_ref.inout (), prefix);
@@ -2217,12 +2219,13 @@ TAO_ORB_Core::list_initial_references (ACE_ENV_SINGLE_ARG_DECL)
CORBA::ORB::ObjectIdList *tmp = 0;
ACE_NEW_THROW_EX (tmp,
- CORBA::ORB::ObjectIdList (total_size),
+ CORBA::ORB::ObjectIdList (
+ ACE_static_cast (CORBA::ULong, total_size)),
CORBA::NO_MEMORY ());
ACE_CHECK_RETURN (0);
CORBA::ORB::ObjectIdList_var list = tmp;
- list->length (total_size);
+ list->length (ACE_static_cast (CORBA::ULong, total_size));
CORBA::ULong index = 0;
// Index for ObjectIdList members.
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 0630a64a26f..7c6e2679ace 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -293,7 +293,8 @@ CORBA::Object::_hash (CORBA::ULong maximum
// of CORBA::ULong since we need to first cast to an integer
// large enough to hold an address to avoid compile-time
// warnings on some 64-bit platforms.
- CORBA::ULong hash = ACE_reinterpret_cast (unsigned long, this);
+ CORBA::ULong hash = ACE_static_cast (CORBA::ULong,
+ ACE_reinterpret_cast (ptr_arith_t, this));
return hash % maximum;
}
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));
diff --git a/TAO/tao/Profile.cpp b/TAO/tao/Profile.cpp
index 3f97980f673..341efa8f02d 100644
--- a/TAO/tao/Profile.cpp
+++ b/TAO/tao/Profile.cpp
@@ -286,7 +286,7 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list
Messaging::PolicyValue pv;
Messaging::PolicyValueSeq policy_value_seq;
- CORBA::ULong length;
+ size_t length;
CORBA::Octet *buf = 0;
policy_value_seq.length (policy_list->length ());
@@ -294,7 +294,7 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list
// This loop iterates through CORBA::PolicyList to convert
// each CORBA::Policy into a CORBA::PolicyValue
const size_t plen = policy_list->length ();
- for (size_t i = 0; i < plen; ++i)
+ for (CORBA::ULong i = 0; i < plen; ++i)
{
TAO_OutputCDR out_CDR;
policy_value_seq[i].ptype =
@@ -305,7 +305,8 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list
(*policy_list)[i]->_tao_encode (out_CDR);
length = out_CDR.total_length ();
- policy_value_seq[i].pvalue.length (length);
+ policy_value_seq[i].pvalue.length (ACE_static_cast (CORBA::ULong,
+ length));
buf = policy_value_seq[i].pvalue.get_buffer ();
@@ -332,14 +333,15 @@ TAO_Profile::policies (CORBA::PolicyList *policy_list
length = out_cdr.total_length ();
- tagged_component.component_data.length (length);
+ tagged_component.component_data.length (ACE_static_cast (CORBA::ULong,
+ length));
buf = tagged_component.component_data.get_buffer ();
for (const ACE_Message_Block *iterator = out_cdr.begin ();
iterator != 0;
iterator = iterator->cont ())
{
- CORBA::ULong i_length = iterator->length ();
+ size_t i_length = iterator->length ();
ACE_OS::memcpy (buf, iterator->rd_ptr (), i_length);
buf += i_length;
@@ -640,7 +642,7 @@ TAO_Unknown_Profile::endpoint (void)
return 0;
}
-size_t
+CORBA::ULong
TAO_Unknown_Profile::endpoint_count (void)
{
return 0;
diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h
index c0daf8729b2..c5cce5ef180 100644
--- a/TAO/tao/Profile.h
+++ b/TAO/tao/Profile.h
@@ -209,7 +209,7 @@ public:
virtual TAO_Endpoint *endpoint (void) = 0;
/// Return how many endpoints this profile contains.
- virtual size_t endpoint_count (void) = 0;
+ virtual CORBA::ULong endpoint_count (void) = 0;
/**
* Return true if this profile is equivalent to other_profile. Two
@@ -360,7 +360,7 @@ public:
virtual const TAO::ObjectKey &object_key (void) const;
virtual TAO::ObjectKey *_key (void) const;
virtual TAO_Endpoint *endpoint (void);
- virtual size_t endpoint_count (void);
+ virtual CORBA::ULong endpoint_count (void);
virtual CORBA::Boolean is_equivalent (const TAO_Profile* other_profile);
virtual CORBA::ULong hash (CORBA::ULong max
ACE_ENV_ARG_DECL);
diff --git a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp
index aedc5479886..775e55da40b 100644
--- a/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp
+++ b/TAO/tao/RTCORBA/RT_Invocation_Endpoint_Selectors.cpp
@@ -304,7 +304,9 @@ TAO_RT_Invocation_Endpoint_Selector::endpoint_from_profile (
{
TAO_Private_Transport_Descriptor private_desc (
invocation->endpoint (),
- ACE_reinterpret_cast (long, invocation->stub ()));
+ ACE_static_cast (long,
+ ACE_reinterpret_cast (ptr_arith_t,
+ invocation->stub ())));
status =
invocation->perform_call (private_desc
diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
index e01ab7aa269..b0478b816a3 100644
--- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
+++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
@@ -615,7 +615,7 @@ TAO_RT_Protocols_Hooks::set_default_policies (ACE_ENV_SINGLE_ARG_DECL)
TAO_ProtocolFactorySet *pfs = this->orb_core_->protocol_factories ();
RTCORBA::ProtocolList protocols;
- protocols.length (pfs->size ());
+ protocols.length (ACE_static_cast (CORBA::ULong, pfs->size ()));
int i = 0;
for (TAO_ProtocolFactorySetItor factory = pfs->begin ();
diff --git a/TAO/tao/RTPortableServer/RT_POA.cpp b/TAO/tao/RTPortableServer/RT_POA.cpp
index a60fd1c2a60..20155c36601 100644
--- a/TAO/tao/RTPortableServer/RT_POA.cpp
+++ b/TAO/tao/RTPortableServer/RT_POA.cpp
@@ -345,7 +345,7 @@ TAO_RT_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/Service_Context.cpp b/TAO/tao/Service_Context.cpp
index b465179d743..2842980d90b 100644
--- a/TAO/tao/Service_Context.cpp
+++ b/TAO/tao/Service_Context.cpp
@@ -19,8 +19,8 @@ TAO_Service_Context::set_context_i (IOP::ServiceId id,
context.context_id = id;
// Make a *copy* of the CDR stream...
- CORBA::ULong length = cdr.total_length ();
- context.context_data.length (length);
+ size_t length = cdr.total_length ();
+ context.context_data.length (ACE_static_cast (CORBA::ULong, length));
CORBA::Octet *buf = context.context_data.get_buffer ();
for (const ACE_Message_Block *i = cdr.begin ();
@@ -40,8 +40,8 @@ TAO_Service_Context::set_context_i (IOP::ServiceContext &context,
TAO_OutputCDR &cdr)
{
// Make a *copy* of the CDR stream...
- CORBA::ULong length = cdr.total_length ();
- context.context_data.length (length);
+ size_t length = cdr.total_length ();
+ context.context_data.length (ACE_static_cast (CORBA::ULong, length));
CORBA::Octet *buf = context.context_data.get_buffer ();
for (const ACE_Message_Block *i = cdr.begin ();
diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp
index f0dd26cd084..741c9e3834a 100644
--- a/TAO/tao/Strategies/DIOP_Acceptor.cpp
+++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp
@@ -558,9 +558,9 @@ TAO_DIOP_Acceptor::probe_interfaces (TAO_ORB_Core *orb_core)
// in the list of interfaces to query for a hostname, otherwise
// exclude it from the list.
if (if_cnt == lo_cnt)
- this->endpoint_count_ = if_cnt;
+ this->endpoint_count_ = ACE_static_cast (CORBA::ULong, if_cnt);
else
- this->endpoint_count_ = if_cnt - lo_cnt;
+ this->endpoint_count_ = ACE_static_cast (CORBA::ULong, if_cnt - lo_cnt);
ACE_NEW_RETURN (this->addrs_,
ACE_INET_Addr[this->endpoint_count_],
@@ -707,7 +707,8 @@ TAO_DIOP_Acceptor::parse_options (const char *str)
if (j < option_count - 1)
end = options.find (option_delimiter, begin);
else
- end = len - begin; // Handle last endpoint differently
+ end = ACE_static_cast (int,
+ len - begin); // Handle last endpoint differently
if (end == begin)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tao/Strategies/DIOP_Acceptor.h b/TAO/tao/Strategies/DIOP_Acceptor.h
index e933af2019a..c3e296e6e03 100644
--- a/TAO/tao/Strategies/DIOP_Acceptor.h
+++ b/TAO/tao/Strategies/DIOP_Acceptor.h
@@ -158,7 +158,7 @@ protected:
/// The number of host names cached in the hosts_ array (equivalent
/// to the number of endpoints opened by this Acceptor).
- size_t endpoint_count_;
+ CORBA::ULong endpoint_count_;
/**
* The GIOP version for this endpoint
diff --git a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp
index 5dbad7978d5..e29535ba633 100644
--- a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp
+++ b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp
@@ -120,7 +120,7 @@ TAO_DIOP_Connection_Handler::open (void*)
}
// Set the id in the transport now that we're active.
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
this->state_changed (TAO_LF_Event::LFS_SUCCESS);
@@ -141,7 +141,7 @@ TAO_DIOP_Connection_Handler::open_server (void)
));
}
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
return 0;
}
@@ -169,7 +169,7 @@ TAO_DIOP_Connection_Handler::activate (long flags,
// @@ Frank: Not disabled yet...
// Set the id in the transport now that we're active.
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
return TAO_DIOP_SVC_HANDLER::activate (flags,
n_threads,
diff --git a/TAO/tao/Strategies/DIOP_Profile.cpp b/TAO/tao/Strategies/DIOP_Profile.cpp
index f76f6d5b772..e99db319aa7 100644
--- a/TAO/tao/Strategies/DIOP_Profile.cpp
+++ b/TAO/tao/Strategies/DIOP_Profile.cpp
@@ -273,7 +273,7 @@ TAO_DIOP_Profile::endpoint (void)
return &this->endpoint_;
}
-size_t
+CORBA::ULong
TAO_DIOP_Profile::endpoint_count (void)
{
return this->count_;
@@ -295,21 +295,21 @@ TAO_DIOP_Profile::to_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
TAO::ObjectKey::encode_sequence_to_string (key.inout(),
this->object_key_);
- u_int buflen = (8 /* "corbaloc" */ +
- 1 /* colon separator */ +
- ACE_OS::strlen (::prefix_) +
- 1 /* colon separator */ +
- 1 /* major version */ +
- 1 /* decimal point */ +
- 1 /* minor version */ +
- 1 /* `@' character */ +
- ACE_OS::strlen (this->endpoint_.host ()) +
- 1 /* colon separator */ +
- 5 /* port number */ +
- 1 /* object key separator */ +
- ACE_OS::strlen (key.in ()));
-
- char * buf = CORBA::string_alloc (buflen);
+ size_t buflen = (8 /* "corbaloc" */ +
+ 1 /* colon separator */ +
+ ACE_OS::strlen (::prefix_) +
+ 1 /* colon separator */ +
+ 1 /* major version */ +
+ 1 /* decimal point */ +
+ 1 /* minor version */ +
+ 1 /* `@' character */ +
+ ACE_OS::strlen (this->endpoint_.host ()) +
+ 1 /* colon separator */ +
+ 5 /* port number */ +
+ 1 /* object key separator */ +
+ ACE_OS::strlen (key.in ()));
+
+ char * buf = CORBA::string_alloc (ACE_static_cast (CORBA::ULong, buflen));
static const char digits [] = "0123456789";
@@ -369,7 +369,7 @@ TAO_DIOP_Profile::encode_endpoints (void)
endpoints.length (this->count_);
const TAO_DIOP_Endpoint *endpoint = &this->endpoint_;
- for (size_t i = 0;
+ for (CORBA::ULong i = 0;
i < this->count_;
++i)
{
@@ -386,11 +386,12 @@ TAO_DIOP_Profile::encode_endpoints (void)
== 0)
|| (out_cdr << endpoints) == 0)
return -1;
- CORBA::ULong length = out_cdr.total_length ();
+ size_t length = out_cdr.total_length ();
IOP::TaggedComponent tagged_component;
tagged_component.tag = TAO_TAG_ENDPOINTS;
- tagged_component.component_data.length (length);
+ tagged_component.component_data.length (ACE_static_cast (CORBA::ULong,
+ length));
CORBA::Octet *buf =
tagged_component.component_data.get_buffer ();
@@ -398,7 +399,7 @@ TAO_DIOP_Profile::encode_endpoints (void)
iterator != 0;
iterator = iterator->cont ())
{
- CORBA::ULong i_length = iterator->length ();
+ size_t i_length = iterator->length ();
ACE_OS::memcpy (buf, iterator->rd_ptr (), i_length);
buf += i_length;
diff --git a/TAO/tao/Strategies/DIOP_Profile.h b/TAO/tao/Strategies/DIOP_Profile.h
index 31ebd3c9b55..77d69cef369 100644
--- a/TAO/tao/Strategies/DIOP_Profile.h
+++ b/TAO/tao/Strategies/DIOP_Profile.h
@@ -80,7 +80,7 @@ public:
virtual char * to_string (ACE_ENV_SINGLE_ARG_DECL);
virtual int encode_endpoints (void);
virtual TAO_Endpoint *endpoint (void);
- virtual size_t endpoint_count (void);
+ virtual CORBA::ULong endpoint_count (void);
virtual CORBA::Boolean is_equivalent (const TAO_Profile *other_profile);
virtual CORBA::ULong hash (CORBA::ULong max
ACE_ENV_ARG_DECL);
@@ -120,7 +120,7 @@ protected:
TAO_DIOP_Endpoint endpoint_;
/// Number of endpoints in the list headed by <endpoint_>.
- size_t count_;
+ CORBA::ULong count_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
index 5d62a5221b3..1439e57f553 100644
--- a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
@@ -468,7 +468,8 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str)
if (j < option_count - 1)
end = options.find (option_delimiter, begin);
else
- end = len - begin; // Handle last endpoint differently
+ end = ACE_static_cast (int,
+ len - begin); // Handle last endpoint differently
if (end == begin)
ACE_ERROR_RETURN ((LM_ERROR,
diff --git a/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp b/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp
index d49921c9ace..eb6320dfbd4 100644
--- a/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp
@@ -104,7 +104,7 @@ TAO_SHMIOP_Connection_Handler::open (void*)
}
// Set the id in the transport now that we're active.
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
// Not needed, anyway
this->state_changed (TAO_LF_Event::LFS_SUCCESS);
@@ -133,7 +133,7 @@ TAO_SHMIOP_Connection_Handler::activate (long flags,
THR_BOUND));
// Set the id in the transport now that we're active.
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
return TAO_SHMIOP_SVC_HANDLER::activate (flags,
n_threads,
diff --git a/TAO/tao/Strategies/SHMIOP_Profile.cpp b/TAO/tao/Strategies/SHMIOP_Profile.cpp
index 687443aacb8..fb9b5691ee7 100644
--- a/TAO/tao/Strategies/SHMIOP_Profile.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Profile.cpp
@@ -88,7 +88,7 @@ TAO_SHMIOP_Profile::endpoint (void)
return &this->endpoint_;
}
-size_t
+CORBA::ULong
TAO_SHMIOP_Profile::endpoint_count (void)
{
return this->count_;
@@ -310,21 +310,21 @@ TAO_SHMIOP_Profile::to_string (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
TAO::ObjectKey::encode_sequence_to_string (key.inout(),
this->object_key_);
- u_int buflen = (8 /* corbaloc */ +
- 1 /* colon separator */ +
- ACE_OS::strlen (::prefix_) +
- 1 /* colon separator */ +
- 1 /* major version */ +
- 1 /* decimal point */ +
- 1 /* minor version */ +
- 1 /* `@' character */ +
- ACE_OS::strlen (this->endpoint_.host ()) +
- 1 /* colon separator */ +
- 5 /* port number */ +
- 1 /* object key separator */ +
- ACE_OS::strlen (key.in ()));
-
- char * buf = CORBA::string_alloc (buflen);
+ size_t buflen = (8 /* corbaloc */ +
+ 1 /* colon separator */ +
+ ACE_OS::strlen (::prefix_) +
+ 1 /* colon separator */ +
+ 1 /* major version */ +
+ 1 /* decimal point */ +
+ 1 /* minor version */ +
+ 1 /* `@' character */ +
+ ACE_OS::strlen (this->endpoint_.host ()) +
+ 1 /* colon separator */ +
+ 5 /* port number */ +
+ 1 /* object key separator */ +
+ ACE_OS::strlen (key.in ()));
+
+ char * buf = CORBA::string_alloc (ACE_static_cast (CORBA::ULong, buflen));
static const char digits [] = "0123456789";
@@ -382,7 +382,7 @@ TAO_SHMIOP_Profile::encode_endpoints (void)
endpoints.length (this->count_);
TAO_SHMIOP_Endpoint *endpoint = &this->endpoint_;
- for (size_t i = 0;
+ for (CORBA::ULong i = 0;
i < this->count_;
++i)
{
@@ -399,11 +399,12 @@ TAO_SHMIOP_Profile::encode_endpoints (void)
== 0)
|| (out_cdr << endpoints) == 0)
return -1;
- CORBA::ULong length = out_cdr.total_length ();
+ size_t length = out_cdr.total_length ();
IOP::TaggedComponent tagged_component;
tagged_component.tag = TAO_TAG_ENDPOINTS;
- tagged_component.component_data.length (length);
+ tagged_component.component_data.length (ACE_static_cast (CORBA::ULong,
+ length));
CORBA::Octet *buf =
tagged_component.component_data.get_buffer ();
@@ -411,7 +412,7 @@ TAO_SHMIOP_Profile::encode_endpoints (void)
iterator != 0;
iterator = iterator->cont ())
{
- CORBA::ULong i_length = iterator->length ();
+ size_t i_length = iterator->length ();
ACE_OS::memcpy (buf, iterator->rd_ptr (), i_length);
buf += i_length;
diff --git a/TAO/tao/Strategies/SHMIOP_Profile.h b/TAO/tao/Strategies/SHMIOP_Profile.h
index 544319d21f7..3053242e39e 100644
--- a/TAO/tao/Strategies/SHMIOP_Profile.h
+++ b/TAO/tao/Strategies/SHMIOP_Profile.h
@@ -80,7 +80,7 @@ public:
virtual char * to_string (ACE_ENV_SINGLE_ARG_DECL);
virtual int encode_endpoints (void);
virtual TAO_Endpoint *endpoint (void);
- virtual size_t endpoint_count (void);
+ virtual CORBA::ULong endpoint_count (void);
virtual CORBA::Boolean is_equivalent (const TAO_Profile *other_profile);
virtual CORBA::ULong hash (CORBA::ULong max
ACE_ENV_ARG_DECL);
@@ -119,7 +119,7 @@ private:
TAO_SHMIOP_Endpoint endpoint_;
/// Number of endpoints in the list headed by <endpoint_>.
- size_t count_;
+ CORBA::ULong count_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
index 3b7ce43c25c..bff3c4dc6bc 100644
--- a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
+++ b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp
@@ -88,7 +88,7 @@ TAO_UIOP_Connection_Handler::open (void*)
addr.get_path_name (), this->peer ().get_handle ()));
// Set the id in the transport now that we're active.
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
this->state_changed (TAO_LF_Event::LFS_SUCCESS);
@@ -116,7 +116,7 @@ TAO_UIOP_Connection_Handler::activate (long flags,
THR_BOUND));
// Set the id in the transport now that we're active.
- this->transport ()->id ((int) this->get_handle ());
+ this->transport ()->id ((size_t) this->get_handle ());
return TAO_UIOP_SVC_HANDLER::activate (flags,
n_threads,
diff --git a/TAO/tao/Strategies/UIOP_Profile.cpp b/TAO/tao/Strategies/UIOP_Profile.cpp
index 159f53264a2..8f8c8dacbdb 100644
--- a/TAO/tao/Strategies/UIOP_Profile.cpp
+++ b/TAO/tao/Strategies/UIOP_Profile.cpp
@@ -88,7 +88,7 @@ TAO_UIOP_Profile::endpoint (void)
return &this->endpoint_;
}
-size_t
+CORBA::ULong
TAO_UIOP_Profile::endpoint_count (void)
{
return this->count_;
diff --git a/TAO/tao/Strategies/UIOP_Profile.h b/TAO/tao/Strategies/UIOP_Profile.h
index e1aaf7b0adf..e005dc9d3af 100644
--- a/TAO/tao/Strategies/UIOP_Profile.h
+++ b/TAO/tao/Strategies/UIOP_Profile.h
@@ -78,7 +78,7 @@ public:
virtual char *to_string (ACE_ENV_SINGLE_ARG_DECL);
virtual int encode_endpoints (void);
virtual TAO_Endpoint *endpoint (void);
- virtual size_t endpoint_count (void);
+ virtual CORBA::ULong endpoint_count (void);
virtual CORBA::Boolean is_equivalent (const TAO_Profile *other_profile);
virtual CORBA::ULong hash (CORBA::ULong max
ACE_ENV_ARG_DECL);
@@ -118,7 +118,7 @@ private:
TAO_UIOP_Endpoint endpoint_;
/// Number of endpoints in the list headed by <endpoint_>.
- size_t count_;
+ CORBA::ULong count_;
};
#if defined (__ACE_INLINE__)
diff --git a/TAO/tao/Synch_Queued_Message.cpp b/TAO/tao/Synch_Queued_Message.cpp
index 6dbf8eb54de..64cf66c6967 100644
--- a/TAO/tao/Synch_Queued_Message.cpp
+++ b/TAO/tao/Synch_Queued_Message.cpp
@@ -65,7 +65,7 @@ TAO_Synch_Queued_Message::fill_iov (int iovcnt_max,
{
// Collect the data in the iovec.
iov[iovcnt].iov_base = message_block->rd_ptr ();
- iov[iovcnt].iov_len = message_block_length;
+ iov[iovcnt].iov_len = ACE_static_cast (u_long, message_block_length);
// Increment iovec counter.
iovcnt++;
diff --git a/TAO/tao/TAO_Server_Request.h b/TAO/tao/TAO_Server_Request.h
index 60536bee8da..030d3a79168 100644
--- a/TAO/tao/TAO_Server_Request.h
+++ b/TAO/tao/TAO_Server_Request.h
@@ -102,7 +102,7 @@ public:
int release);
/// Return the length of the operation.
- unsigned int operation_length (void) const;
+ size_t operation_length (void) const;
//@}
/// Return the underlying ORB.
diff --git a/TAO/tao/TAO_Server_Request.i b/TAO/tao/TAO_Server_Request.i
index b9f2f4c2dc6..2b3dee08baa 100644
--- a/TAO/tao/TAO_Server_Request.i
+++ b/TAO/tao/TAO_Server_Request.i
@@ -37,7 +37,7 @@ TAO_ServerRequest::operation (const char *operation,
this->operation_.set (operation, length, release);
}
-ACE_INLINE unsigned int
+ACE_INLINE size_t
TAO_ServerRequest::operation_length (void) const
{
return this->operation_.length ();
diff --git a/TAO/tao/Tagged_Components.cpp b/TAO/tao/Tagged_Components.cpp
index 9158819c7f7..e1ad37764c5 100644
--- a/TAO/tao/Tagged_Components.cpp
+++ b/TAO/tao/Tagged_Components.cpp
@@ -77,8 +77,8 @@ TAO_Tagged_Components::set_component_i (IOP::ComponentId tag,
component.tag = tag;
// Make a *copy* of the CDR stream...
- CORBA::ULong length = cdr.total_length ();
- component.component_data.length (length);
+ size_t length = cdr.total_length ();
+ component.component_data.length (ACE_static_cast (CORBA::ULong, length));
CORBA::Octet *buf = component.component_data.get_buffer ();
for (const ACE_Message_Block *i = cdr.begin ();
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index fae8fa4c7b8..541ddf256c1 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -39,7 +39,7 @@ ACE_RCSID (tao,
* Static function in file scope
*/
static void
-dump_iov (iovec *iov, int iovcnt, int id,
+dump_iov (iovec *iov, int iovcnt, size_t id,
size_t current_transfer,
const char *location)
{
@@ -112,7 +112,7 @@ TAO_Transport::TAO_Transport (CORBA::ULong tag,
, flush_timer_id_ (-1)
, transport_timer_ (this)
, handler_lock_ (orb_core->resource_factory ()->create_cached_connection_lock ())
- , id_ ((long) this)
+ , id_ ((size_t) this)
, purging_order_ (0)
, char_translator_ (0)
, wchar_translator_ (0)
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index f7c46c4b6d9..6551171ead8 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -275,8 +275,8 @@ public:
* the <code>this</code> pointer for the instance on which
* it's called.
*/
- int id (void) const;
- void id (int id);
+ size_t id (void) const;
+ void id (size_t id);
/// Get and Set the purging order. The purging strategy uses the set
/// version to set the purging order.
@@ -995,7 +995,7 @@ protected:
* HINT: Protocol-specific transports that use connection handler
* might choose to set this to the handle for their connection.
*/
- int id_;
+ size_t id_;
/// Used by the LRU, LFU and FIFO Connection Purging Strategies.
unsigned long purging_order_;
diff --git a/TAO/tao/Transport.inl b/TAO/tao/Transport.inl
index 35d83851d6e..53da1d841b9 100644
--- a/TAO/tao/Transport.inl
+++ b/TAO/tao/Transport.inl
@@ -68,14 +68,14 @@ TAO_Transport::purging_order (unsigned long value)
this->purging_order_ = value;
}
-ACE_INLINE int
+ACE_INLINE size_t
TAO_Transport::id (void) const
{
return this->id_;
}
ACE_INLINE void
-TAO_Transport::id (int id)
+TAO_Transport::id (size_t id)
{
this->id_ = id;
}
diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp
index eb23ede059a..f8a86092834 100644
--- a/TAO/tao/Transport_Cache_Manager.cpp
+++ b/TAO/tao/Transport_Cache_Manager.cpp
@@ -583,7 +583,7 @@ TAO_Transport_Cache_Manager::fill_set_i (DESCRIPTOR_SET& sorted_set)
// Do we need to worry about cache purging?
if (cache_maximum >= 0)
{
- current_size = this->cache_map_.current_size ();
+ current_size = ACE_static_cast (int, this->cache_map_.current_size ());
if (TAO_debug_level > 0)
{
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index ea4c2ef817a..a3997921575 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -3668,9 +3668,10 @@ operator<< (TAO_OutputCDR& cdr, const CORBA::TypeCode *x)
case CORBA::tk_except:
case CORBA::tk_value:
{
- if (!cdr.write_ulong (x->length_)
+ CORBA::ULong xlen = ACE_static_cast (CORBA::ULong, x->length_);
+ if (!cdr.write_ulong (xlen)
|| !cdr.write_octet_array ((CORBA::Octet*)x->buffer_,
- x->length_))
+ xlen))
{
return 0;
}
diff --git a/TAO/tao/corbafwd.cpp b/TAO/tao/corbafwd.cpp
index 7e2ef5c444e..729c1878842 100644
--- a/TAO/tao/corbafwd.cpp
+++ b/TAO/tao/corbafwd.cpp
@@ -26,7 +26,7 @@ CORBA::string_dup (const char *str)
size_t len = ACE_OS::strlen (str);
// This allocates an extra byte for the '\0';
- char * copy = CORBA::string_alloc (len);
+ char * copy = CORBA::string_alloc (ACE_static_cast (CORBA::ULong, len));
// The memcpy() below assumes that the destination is a valid buffer.
if (copy == 0)
diff --git a/TAO/tao/default_resource.cpp b/TAO/tao/default_resource.cpp
index 320964181e1..fe7a34d5c1e 100644
--- a/TAO/tao/default_resource.cpp
+++ b/TAO/tao/default_resource.cpp
@@ -486,7 +486,7 @@ TAO_Default_Resource_Factory::get_parser_names (char **&names,
this->parser_names_ =
new char *[this->parser_names_count_];
- size_t index = 0;
+ CORBA::ULong index = 0;
this->parser_names_[index] = CORBA::string_dup ("DLL_Parser");
index++;
diff --git a/TAO/tao/default_resource.h b/TAO/tao/default_resource.h
index 94e7b4cc691..44c2811e2bd 100644
--- a/TAO/tao/default_resource.h
+++ b/TAO/tao/default_resource.h
@@ -179,7 +179,7 @@ protected:
/// Specifies the limit on the number of muxed connections
/// allowed per-property for the ORB. A value of 0 indicates no
/// limit
- size_t max_muxed_connections_;
+ int max_muxed_connections_;
/// If <0> then we create reactors with signal handling disabled.
int reactor_mask_signals_;
diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp
index 3d721daf21f..db5cf667fa7 100644
--- a/TAO/tao/params.cpp
+++ b/TAO/tao/params.cpp
@@ -51,7 +51,7 @@ TAO_ORB_Parameters::parse_endpoints (ACE_CString &endpoints,
const char endpoints_delimiter = ';';
- int length = endpoints.length ();
+ size_t length = endpoints.length ();
if (endpoints[0] == endpoints_delimiter ||
endpoints[length - 1] == endpoints_delimiter)
@@ -66,7 +66,7 @@ TAO_ORB_Parameters::parse_endpoints (ACE_CString &endpoints,
{
int endpoints_count = 1;
- for (int j = 0; j != length; ++j)
+ for (size_t j = 0; j != length; ++j)
{
if (endpoints[j] == endpoints_delimiter)
endpoints_count++;