From f235db577e071793ea0a754ed5d3799568070333 Mon Sep 17 00:00:00 2001 From: parsons Date: Fri, 12 Dec 2003 17:39:32 +0000 Subject: ChangeLogTag: Fri Dec 12 11:35:30 2003 Jeff Parsons --- TAO/ChangeLog | 18 ++++++++++++++++++ TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp | 10 ++++++++-- TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h | 2 +- TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp | 5 +++-- TAO/orbsvcs/orbsvcs/Log/Log_i.cpp | 4 ++-- TAO/tao/Typecode.cpp | 13 +++++++++++++ 6 files changed, 45 insertions(+), 7 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 0aa9af9aa73..f7d548c22ed 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,21 @@ +Fri Dec 12 11:35:30 2003 Jeff Parsons + + * orbsvcs/IFR_Service/ifr_adding_visitor.cpp: + * orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h: + * orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp: + * orbsvcs/orbsvcs/Log/Log_i.cpp: + + Added some explicit casting to elininate warnings by MSVC 7.1. + + * tao/Typecode.cpp: + + Added memory leak fix overlooked in + + Sat Nov 29 11:42:48 2003 Jeff Parsons + + Thanks again to Harvinder Sawhney + for suggesting these fixes. + Fri Dec 12 08:38:14 2003 Balachandran Natarajan * orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h: diff --git a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp index 59a832fac0d..8c4f8055fe7 100644 --- a/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp +++ b/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp @@ -876,6 +876,9 @@ ifr_adding_visitor::visit_valuetype_fwd (AST_ValueTypeFwd *node) CORBA::Container_ptr current_scope = CORBA::Container::_nil (); + + CORBA::Boolean abstract = + ACE_static_cast (CORBA::Boolean, v->is_abstract ()); if (be_global->ifr_scopes ().top (current_scope) == 0) { @@ -885,7 +888,7 @@ ifr_adding_visitor::visit_valuetype_fwd (AST_ValueTypeFwd *node) v->local_name ()->get_string (), v->version (), 0, // 'custom' not handled yet - v->is_abstract (), + abstract, CORBA::ValueDef::_nil (), 0, // 'truncatable' not handled yet abstract_bases, @@ -1588,6 +1591,9 @@ ifr_adding_visitor::visit_eventtype_fwd (AST_EventTypeFwd *node) ACE_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; + + CORBA::Boolean abstract = + ACE_static_cast (CORBA::Boolean, v->is_abstract ()); this->ir_current_ = ccm_scope->create_event ( @@ -1595,7 +1601,7 @@ ifr_adding_visitor::visit_eventtype_fwd (AST_EventTypeFwd *node) v->local_name ()->get_string (), v->version (), 0, // 'custom' not handled yet - v->is_abstract (), + abstract, CORBA::ValueDef::_nil (), 0, // 'truncatable' not handled yet abstract_bases, diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h index a3a6740b5cc..5003c38d475 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LeastLoaded.h @@ -58,7 +58,7 @@ namespace TAO_LB * residing at the location corresponding to one of the two loads * will be selected at random. */ - const CORBA::Float LL_DEFAULT_LOAD_PERCENT_DIFF_CUTOFF = (CORBA::Float) 0.01; // 1% + const CORBA::Float LL_DEFAULT_LOAD_PERCENT_DIFF_CUTOFF = 0.01f; // 1% //@} } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp index 875b65b2f6d..c1e1bf9d684 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_Random.cpp @@ -144,8 +144,9 @@ TAO_LB_Random::_tao_next_member ( // addition to the fact that the lower order bits should be as // random as the higher order bits. - const CORBA::Float flen = len; // Prevent integer arithmetic - // overflow. + // Prevent integer arithmetic overflow. + const CORBA::Float flen = ACE_static_cast (CORBA::Float, len); + const CORBA::ULong i = ACE_static_cast (CORBA::ULong, flen * ACE_OS::rand () / (RAND_MAX + 1.0)); diff --git a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp index 64c9225a670..a33ee680cd5 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Log_i.cpp @@ -1247,8 +1247,8 @@ TAO_Log_i::remove_old_records (ACE_ENV_SINGLE_ARG_DECL) static char out[256] = ""; - double temp1 = - ACE_UINT64_DBLCAST_ADAPTER (p_time); + // ACE_UINT64_DBLCAST_ADAPTER doesn't work here with MSVC 7.1. + double temp1 = (double) (p_time); ACE_OS::sprintf (out, "time > %.0f", temp1); diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp index e915aebde02..09b644120f4 100644 --- a/TAO/tao/Typecode.cpp +++ b/TAO/tao/Typecode.cpp @@ -294,6 +294,19 @@ CORBA::TypeCode::~TypeCode (void) // Free up our private state. delete this->private_state_; this->private_state_ = 0; + + if (this->offset_map_ != 0) + { + OFFSET_MAP_ENTRY *entry = 0; + + for (CORBA::TypeCode::OFFSET_MAP_ITERATOR iter (*this->offset_map_); + iter.next (entry) != 0; + iter.advance ()) + { + CORBA::string_free ((char*)entry->ext_id_); + delete entry->int_id_; + } + } delete this->offset_map_; this->offset_map_ = 0; -- cgit v1.2.1