summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Corino <mcorino@remedy.nl>2015-06-01 11:59:42 +0200
committerMartin Corino <mcorino@remedy.nl>2015-06-01 11:59:42 +0200
commit3217bb88f53bca2644aed79a0589a82352fa2982 (patch)
treeff6b4687b886f535a4cc34d9048a2012cf944fb0
parent1c9e65f71f07c3438ae98ddba6b4563578bf25a0 (diff)
downloadATCD-3217bb88f53bca2644aed79a0589a82352fa2982.tar.gz
Fix MSVC integer conversion warnings.
* TAO/tao/Strategies/DIOP_Profile.cpp: * TAO/tao/Strategies/DIOP_Transport.cpp: * TAO/tao/Strategies/SHMIOP_Profile.cpp:
-rw-r--r--TAO/tao/Strategies/DIOP_Profile.cpp7
-rw-r--r--TAO/tao/Strategies/DIOP_Transport.cpp2
-rw-r--r--TAO/tao/Strategies/SHMIOP_Profile.cpp6
3 files changed, 8 insertions, 7 deletions
diff --git a/TAO/tao/Strategies/DIOP_Profile.cpp b/TAO/tao/Strategies/DIOP_Profile.cpp
index 852b24d9f5e..463806b64b3 100644
--- a/TAO/tao/Strategies/DIOP_Profile.cpp
+++ b/TAO/tao/Strategies/DIOP_Profile.cpp
@@ -12,6 +12,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
#include "ace/os_include/os_netdb.h"
+#include "ace/Truncate.h"
static const char the_prefix[] = "diop";
@@ -190,7 +191,7 @@ TAO_DIOP_Profile::parse_string_i (const char *ior)
else if (cp_pos != 0)
{
// A port number or port name was specified.
- CORBA::ULong length_port = okd - cp_pos - 1;
+ CORBA::ULong length_port = ACE_Utils::truncate_cast<CORBA::ULong> (okd - cp_pos - 1);
CORBA::String_var tmp = CORBA::string_alloc (length_port);
@@ -219,10 +220,10 @@ TAO_DIOP_Profile::parse_string_i (const char *ior)
}
}
- length_host = cp_pos - ior;
+ length_host = ACE_Utils::truncate_cast<CORBA::ULong> (cp_pos - ior);
}
else
- length_host = okd - ior;
+ length_host = ACE_Utils::truncate_cast<CORBA::ULong> (okd - ior);
#if defined (ACE_HAS_IPV6)
if (ipv6_in_host)
diff --git a/TAO/tao/Strategies/DIOP_Transport.cpp b/TAO/tao/Strategies/DIOP_Transport.cpp
index d2ffe5ef408..05f210b7243 100644
--- a/TAO/tao/Strategies/DIOP_Transport.cpp
+++ b/TAO/tao/Strategies/DIOP_Transport.cpp
@@ -166,7 +166,7 @@ TAO_DIOP_Transport::handle_input (TAO_Resume_Handle &rh,
this->tms_->connection_closed ();
}
- return n;
+ return static_cast<int> (n);
}
// Set the write pointer in the stack buffer
diff --git a/TAO/tao/Strategies/SHMIOP_Profile.cpp b/TAO/tao/Strategies/SHMIOP_Profile.cpp
index c7291d9ee54..94c29e1ff66 100644
--- a/TAO/tao/Strategies/SHMIOP_Profile.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Profile.cpp
@@ -12,7 +12,7 @@
#include "ace/OS_NS_stdio.h"
#include "ace/OS_NS_string.h"
#include "ace/os_include/os_netdb.h"
-#include "ace/os_include/os_netdb.h"
+#include "ace/Truncate.h"
static const char prefix_[] = "shmiop";
@@ -158,7 +158,7 @@ TAO_SHMIOP_Profile::parse_string_i (const char *string
// Don't increment the pointer 'cp' directly since we still need
// to use it immediately after this block.
- CORBA::ULong length = okd - (cp + 1);
+ CORBA::ULong length = ACE_Utils::truncate_cast<CORBA::ULong> (okd - (cp + 1));
// Don't allocate space for the colon ':'.
CORBA::String_var tmp = CORBA::string_alloc (length);
@@ -188,7 +188,7 @@ TAO_SHMIOP_Profile::parse_string_i (const char *string
}
}
- length = cp - start;
+ length = ACE_Utils::truncate_cast<CORBA::ULong> (cp - start);
tmp = CORBA::string_alloc (length);