summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorocielliottc <elliottc@objectcomputing.com>2019-06-21 06:21:36 -0500
committerGitHub <noreply@github.com>2019-06-21 06:21:36 -0500
commit4a76c5d4c6606370ce3df6c34c5614c6f7393da2 (patch)
tree82ad91ea7cc05e6179a737ed1550366b7ea56a8b
parentac55bf6192711ae2b0391c6b143c9744e46c892d (diff)
parenta00b1a3d43eaac70178887e53500216c78b8581f (diff)
downloadATCD-4a76c5d4c6606370ce3df6c34c5614c6f7393da2.tar.gz
Merge pull request #925 from ocielliottc/build_warnings
Changed types and added static_casts to resolve 64-bit warnings.
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp8
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp12
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp6
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp2
6 files changed, 17 insertions, 17 deletions
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
index 50ca6ae1667..4d5b68919d8 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp
@@ -299,7 +299,7 @@ TAO::PG_Group_Factory::groups_at_location (
const PortableGroup::Location & the_location)
{
Group_Map & group_map = this->get_group_map ();
- size_t upper_limit = group_map.current_size ();
+ CORBA::ULong const upper_limit = static_cast<CORBA::ULong> (group_map.current_size ());
PortableGroup::ObjectGroups * result = 0;
ACE_NEW_THROW_EX (
result,
@@ -308,7 +308,7 @@ TAO::PG_Group_Factory::groups_at_location (
result->length(upper_limit);
- size_t group_count = 0;
+ CORBA::ULong group_count = 0;
for (Group_Map_Iterator it = group_map.begin ();
it != group_map.end ();
++it)
@@ -328,7 +328,7 @@ PortableGroup::ObjectGroups *
TAO::PG_Group_Factory::all_groups (void)
{
Group_Map & group_map = this->get_group_map ();
- size_t upper_limit = group_map.current_size ();
+ CORBA::ULong const upper_limit = static_cast<CORBA::ULong> (group_map.current_size ());
PortableGroup::ObjectGroups * result = 0;
ACE_NEW_THROW_EX (
result,
@@ -337,7 +337,7 @@ TAO::PG_Group_Factory::all_groups (void)
result->length(upper_limit);
- size_t group_count = 0;
+ CORBA::ULong group_count = 0;
for (Group_Map_Iterator it = group_map.begin ();
it != group_map.end ();
++it)
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp
index 266859dfd9f..566182384dd 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.cpp
@@ -601,7 +601,7 @@ TAO::PG_Object_Group_Storable::write (TAO::Storable_Base & stream)
stream << properties_cdr;
///// members_ /////
- int num_members = this->members_.current_size ();
+ size_t const num_members = this->members_.current_size ();
stream << num_members;
for (MemberMap_Iterator it = this->members_.begin ();
it != this->members_.end ();
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp
index 858e3b1e703..590c5faa2d7 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp
@@ -40,9 +40,9 @@ void TAO_PG::Properties_Encoder::encode (
PortableGroup::Properties * property_set) const
{
ACE_ASSERT (property_set != 0);
- size_t count = values_.size();
+ CORBA::ULong const count = static_cast<CORBA::ULong> (values_.size());
property_set->length(count);
- for( size_t nItem = 0; nItem < count; ++nItem )
+ for( CORBA::ULong nItem = 0; nItem < count; ++nItem )
{
const NamedValue & nv = values_[nItem];
PortableGroup::Property & property = (*property_set)[nItem];
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp
index e074d429f4f..bf18a767a8a 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp
@@ -54,8 +54,8 @@ TAO::PG_Property_Set::decode (const PortableGroup::Properties & property_set)
{
ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->internals_);
- size_t count = property_set.length ();
- for (size_t nItem = 0; nItem < count; ++nItem)
+ CORBA::ULong const count = property_set.length ();
+ for (CORBA::ULong nItem = 0; nItem < count; ++nItem)
{
const PortableGroup::Property & property = property_set[nItem];
const CosNaming::Name & nsName = property.nam;
@@ -112,8 +112,8 @@ void TAO::PG_Property_Set::clear ()
void TAO::PG_Property_Set::remove (const PortableGroup::Properties & property_set)
{
ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->internals_);
- size_t count = property_set.length ();
- for (size_t nItem = 0; nItem < count; ++nItem)
+ CORBA::ULong const count = property_set.length ();
+ for (CORBA::ULong nItem = 0; nItem < count; ++nItem)
{
const PortableGroup::Property & property = property_set[nItem];
const CosNaming::Name & nsName = property.nam;
@@ -170,9 +170,9 @@ void TAO::PG_Property_Set::export_properties(PortableGroup::Properties & propert
ValueMap merged_values;
this->merge_properties (merged_values);
- property_set.length (merged_values.current_size ());
+ property_set.length (static_cast<CORBA::ULong> (merged_values.current_size ()));
- size_t pos = 0;
+ CORBA::ULong pos = 0;
for (ValueMapIterator it = merged_values.begin ();
it != merged_values.end ();
++it)
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp
index 54a4d77aad0..869c727e0ed 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Message_Block_Data_Iterator.cpp
@@ -38,7 +38,7 @@ UIPMC_Message_Block_Data_Iterator::next_block (size_t max_length,
{
// Let the caller use the first part of this
// message block.
- block.iov_len = max_length;
+ block.iov_len = static_cast<u_long> (max_length);
block.iov_base = this->iov_[this->iov_index_].iov_base;
// Break up the block.
@@ -57,7 +57,7 @@ UIPMC_Message_Block_Data_Iterator::next_block (size_t max_length,
if (this->iov_len_left_ <= max_length)
{
// Return everything that's left in the block.
- block.iov_len = this->iov_len_left_;
+ block.iov_len = static_cast<u_long> (this->iov_len_left_);
block.iov_base = this->iov_ptr_;
// Go to the next block.
@@ -71,7 +71,7 @@ UIPMC_Message_Block_Data_Iterator::next_block (size_t max_length,
else
{
// Split a little more off the block.
- block.iov_len = max_length;
+ block.iov_len = static_cast<u_long> (max_length);
block.iov_base = this->iov_ptr_;
this->iov_len_left_ -= max_length;
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp
index f41d5f3116a..5090520c7c5 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp
@@ -94,7 +94,7 @@ TAO_UIPMC_Profile::decode (TAO_InputCDR& cdr)
{
// The following is a selective reproduction of TAO_Profile::decode
- CORBA::ULong encap_len = cdr.length ();
+ CORBA::ULong const encap_len = static_cast<CORBA::ULong> (cdr.length ());
// Read and verify major, minor versions, ignoring profiles
// whose versions we don't understand.