diff options
Diffstat (limited to 'TAO')
24 files changed, 88 insertions, 84 deletions
diff --git a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp index 0f55ff6e58e..2ef60804821 100644 --- a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp +++ b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.cpp @@ -27,7 +27,7 @@ Criteria_Evaluator::~Criteria_Evaluator () LifeCycleService::Criteria_Evaluator::SeqNamedValuePair * Criteria_Evaluator::getInitialization (void) { - LifeCycleService::Criteria_Evaluator::SeqNamedValuePair *sequence_ptr = 0; + const LifeCycleService::Criteria_Evaluator::SeqNamedValuePair *sequence_ptr = 0; CORBA::Any *any_ptr = this->getCriteriaMember ("initialization"); diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp index 98c3f7bf520..6da3603d0c6 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp @@ -718,9 +718,11 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party, try { CORBA::Any_ptr flows_any = this->sep_a_->get_property_value ("Flows"); - AVStreams::flowSpec_var flows; - *flows_any >>= flows.out (); - for (CORBA::ULong i=0; i< flows->length ();++i) + AVStreams::flowSpec flows; + const AVStreams::flowSpec *temp_flows = 0; + *flows_any >>= temp_flows; + flows = *temp_flows; + for (CORBA::ULong i=0; i< flows.length ();++i) { CORBA::Object_var fep_obj = this->sep_a_->get_fep (flows [i]); @@ -911,15 +913,15 @@ TAO_StreamCtrl::bind (AVStreams::StreamEndPoint_A_ptr sep_a, AVStreams::flowSpec a_flows, b_flows; CORBA::Any_var flows_any; flows_any = sep_a_->get_property_value ("Flows"); - AVStreams::flowSpec *temp_flows = 0; + const AVStreams::flowSpec *temp_flows = 0; flows_any.in () >>= temp_flows; a_flows = *temp_flows; flows_any = sep_b_->get_property_value ("Flows"); flows_any.in () >>= temp_flows; b_flows = *temp_flows; u_int i; - FlowEndPoint_Map *a_fep_map; - FlowEndPoint_Map *b_fep_map; + FlowEndPoint_Map *a_fep_map = 0; + FlowEndPoint_Map *b_fep_map = 0; ACE_NEW_RETURN (a_fep_map, FlowEndPoint_Map, 0); @@ -1611,7 +1613,7 @@ TAO_StreamEndPoint::connect (AVStreams::StreamEndPoint_ptr responder, CORBA::Any_var protocols_any = responder->get_property_value ("AvailableProtocols"); AVStreams::protocolSpec peer_protocols; - AVStreams::protocolSpec *temp_protocols = 0; + const AVStreams::protocolSpec *temp_protocols = 0; protocols_any.in () >>= temp_protocols; peer_protocols = *temp_protocols; for (u_int i=0;i<peer_protocols.length ();i++) @@ -4024,7 +4026,7 @@ TAO_FlowEndPoint::set_protocol_restriction (const AVStreams::protocolSpec & prot AvailableProtocols_property <<= protocols; this->define_property ("AvailableProtocols", AvailableProtocols_property); - AVStreams::protocolSpec *temp_spec = 0; + const AVStreams::protocolSpec *temp_spec = 0; CORBA::Any_var temp_any = this->get_property_value ("AvailableProtocols"); temp_any.in () >>= temp_spec; if (TAO_debug_level > 0) ORBSVCS_DEBUG ((LM_DEBUG, "%N:%l\n")); @@ -4072,7 +4074,7 @@ TAO_FlowEndPoint::is_fep_compatible (AVStreams::FlowEndPoint_ptr peer_fep) // since formats are same, check for a common protocol CORBA::Any_var AvailableProtocols_ptr; AVStreams::protocolSpec my_protocol_spec, peer_protocol_spec; - AVStreams::protocolSpec *temp_protocols = 0; + const AVStreams::protocolSpec *temp_protocols = 0; exception_message = "TAO_FlowEndPoint::is_fep_compatible - AvailableProtocols"; @@ -4158,7 +4160,7 @@ TAO_FlowEndPoint::go_to_listen_i (TAO_FlowSpec_Entry::Role role, break; } AVStreams::protocolSpec my_protocol_spec, peer_protocol_spec; - AVStreams::protocolSpec *temp_protocols = 0; + const AVStreams::protocolSpec *temp_protocols = 0; CORBA::Any_var AvailableProtocols_ptr = peer_fep->get_property_value ("AvailableProtocols"); AvailableProtocols_ptr.in () >>= temp_protocols; diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h index 8b993616b0b..459d8979c95 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h @@ -567,7 +567,7 @@ protected: TAO_AV_FlowSpecSet forward_flow_spec_set; TAO_AV_FlowSpecSet reverse_flow_spec_set; AVStreams::StreamEndPoint_var peer_sep_; - AVStreams::SFPStatus *sfp_status_; + const AVStreams::SFPStatus *sfp_status_; AVStreams::StreamCtrl_var streamctrl_; }; diff --git a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp index a71f1d99935..c0e3ab94736 100644 --- a/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp +++ b/TAO/orbsvcs/orbsvcs/FaultTolerance/FT_ClientPolicy_i.cpp @@ -103,7 +103,7 @@ TAO_FT_Heart_Beat_Policy::heartbeat_policy_value (void) CORBA::Policy_ptr TAO_FT_Heart_Beat_Policy::create (const CORBA::Any& val) { - FT::HeartbeatPolicyValue *value = 0; + const FT::HeartbeatPolicyValue *value = 0; if ((val >>= value) == 0) throw CORBA::PolicyError (CORBA::BAD_POLICY_VALUE); diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/ClientORB/FTRT_ClientORB_Loader.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/ClientORB/FTRT_ClientORB_Loader.cpp index 8c4824aad36..0e9e8568433 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/ClientORB/FTRT_ClientORB_Loader.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/ClientORB/FTRT_ClientORB_Loader.cpp @@ -35,17 +35,18 @@ namespace TAO_FTRT { // Parse any service configurator parameters. for (curarg = 0; curarg < argc; curarg++) - if (ACE_OS::strcasecmp (argv[curarg], - ACE_TEXT("-ORBTransactionDepth")) == 0) { - curarg++; - if (curarg < argc) - transaction_depth = ACE_OS::atoi(argv[curarg]); + if (ACE_OS::strcasecmp (argv[curarg], + ACE_TEXT("-ORBTransactionDepth")) == 0) + { + curarg++; + if (curarg < argc) + transaction_depth = ACE_OS::atoi(argv[curarg]); + } } - - // Register the ORB initializer. - try + // Register the ORB initializer. + try { PortableInterceptor::ORBInitializer_ptr temp_orb_initializer = PortableInterceptor::ORBInitializer::_nil (); @@ -63,14 +64,14 @@ namespace TAO_FTRT { PortableInterceptor::register_orb_initializer (orb_initializer.in ()); } - catch (const CORBA::Exception& ex) + catch (const CORBA::Exception& ex) { ex._tao_print_exception ( "Unexpected exception caught while ""initializing the TransactionDepth"); return 1; } - return 0; + return 0; } } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp index d78e8d93725..0ed1e4bc740 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel_Impl.cpp @@ -267,9 +267,9 @@ TAO_FTEC_Event_Channel_Impl::connect_push_consumer ( ACE_NEW_THROW_EX(oid, FtRtecEventChannelAdmin::ObjectId, CORBA::NO_MEMORY()); - FtRtecEventChannelAdmin::ObjectId_var object_id = oid; + FtRtecEventChannelAdmin::ObjectId_var object_id = *oid; - Request_Context_Repository().generate_object_id(*oid); + Request_Context_Repository().generate_object_id(object_id.inout ()); obtain_push_supplier_and_connect(this, object_id.in(), @@ -302,9 +302,9 @@ TAO_FTEC_Event_Channel_Impl::connect_push_supplier ( ACE_NEW_THROW_EX(oid, FtRtecEventChannelAdmin::ObjectId, CORBA::NO_MEMORY()); - FtRtecEventChannelAdmin::ObjectId_var object_id = oid; + FtRtecEventChannelAdmin::ObjectId_var object_id = *oid; - Request_Context_Repository().generate_object_id(*oid); + Request_Context_Repository().generate_object_id(object_id.inout ()); obtain_push_consumer_and_connect(this, object_id.in(), diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp index a95575bb02c..1e121a867df 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Request_Context_Repository.cpp @@ -73,7 +73,7 @@ get_object_id(CORBA::Any_var a) FtRtecEventChannelAdmin::ObjectId(*object_id), CORBA::NO_MEMORY()); - result = r; + result = *r; return result; } diff --git a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp index 001c0053dd4..908c7de402c 100644 --- a/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Set_Update_Interceptor.cpp @@ -45,12 +45,13 @@ TAO_Set_Update_Interceptor::send_request ( { CORBA::Any_var a = Request_Context_Repository().get_ft_request_service_context(ri); - const IOP::ServiceContext* sc = 0; + const IOP::ServiceContext* scp = 0; - if ((a.in() >>= sc) ==0) + if ((a.in() >>= scp) == 0) return; - ri->add_request_service_context (*sc, 0); + IOP::ServiceContext sc = *scp; + ri->add_request_service_context (sc, 0); FTRT::TransactionDepth transaction_depth = Request_Context_Repository().get_transaction_depth(ri); @@ -64,26 +65,26 @@ TAO_Set_Update_Interceptor::send_request ( // Add Transaction Depth Context if ((cdr << transaction_depth) == 0) throw CORBA::MARSHAL (); - sc->context_id = FTRT::FT_TRANSACTION_DEPTH; + sc.context_id = FTRT::FT_TRANSACTION_DEPTH; ACE_CDR::consolidate(&mb, cdr.begin()); #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - sc->context_data.replace(mb.length(), &mb); + sc.context_data.replace(mb.length(), &mb); #else // If the replace method is not available, we will need // to do the copy manually. First, set the octet sequence length. CORBA::ULong length = mb.length (); - sc->context_data.length (length); + sc.context_data.length (length); // Now copy over each byte. char* base = mb.data_block ()->base (); for(CORBA::ULong i = 0; i < length; i++) { - sc->context_data[i] = base[i]; + sc.context_data[i] = base[i]; } #endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ - ri->add_request_service_context (*sc, 0); + ri->add_request_service_context (sc, 0); cdr.reset(); } @@ -99,26 +100,26 @@ TAO_Set_Update_Interceptor::send_request ( throw CORBA::MARSHAL (); if ((cdr << sequence_number) == 0) throw CORBA::MARSHAL (); - sc->context_id = FTRT::FT_SEQUENCE_NUMBER; + sc.context_id = FTRT::FT_SEQUENCE_NUMBER; ACE_CDR::consolidate(&mb, cdr.begin()); #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - sc->context_data.replace(mb.length(), &mb); + sc.context_data.replace(mb.length(), &mb); #else // If the replace method is not available, we will need // to do the copy manually. First, set the octet sequence length. CORBA::ULong length = mb.length (); - sc->context_data.length (length); + sc.context_data.length (length); // Now copy over each byte. char* base = mb.data_block ()->base (); for(CORBA::ULong i = 0; i < length; i++) { - sc->context_data[i] = base[i]; + sc.context_data[i] = base[i]; } #endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ - ri->add_request_service_context (*sc, 0); + ri->add_request_service_context (sc, 0); } } } diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp index 78f2d4b59b7..93b1d34637b 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.cpp @@ -958,7 +958,7 @@ TAO_LB_LoadManager::preprocess_properties (PortableGroup::Properties & props) } CosLoadBalancing::Strategy_ptr -TAO_LB_LoadManager::make_strategy (CosLoadBalancing::StrategyInfo * info) +TAO_LB_LoadManager::make_strategy (const CosLoadBalancing::StrategyInfo * info) { /** * @todo We need a strategy factory. This is just too messy. diff --git a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h index 45f48dbf32a..b527dae317e 100644 --- a/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h +++ b/TAO/orbsvcs/orbsvcs/LoadBalancing/LB_LoadManager.h @@ -312,7 +312,7 @@ private: /// Create a built-in load balancing strategy and return a reference /// to it. CosLoadBalancing::Strategy_ptr make_strategy ( - CosLoadBalancing::StrategyInfo * info); + const CosLoadBalancing::StrategyInfo * info); private: diff --git a/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp b/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp index db3745cf760..520709eff1d 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Property_T.cpp @@ -112,7 +112,7 @@ TAO_Notify_StructProperty_T<TYPE>::set ( if (property_seq.find (this->name_, value) == 0) { - TYPE* extract_type = 0; + const TYPE* extract_type = 0; if ((value >>= extract_type) && extract_type != 0) // make sure we get something valid. { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp index 4c11746bffd..d5d09e51d8e 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp @@ -94,7 +94,7 @@ TAO_PG_Default_Property_Validator::validate_criteria ( } else if (property.nam == this->factories_) { - copnst PortableGroup::FactoriesValue * factories = 0; + const PortableGroup::FactoriesValue * factories = 0; if (!(property.val >>= factories)) invalid_criteria[p++] = property; else diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h index 46fa552893b..728addb72e7 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h @@ -37,7 +37,7 @@ namespace TAO int find (const PG_Property_Set & decoder, const ACE_CString & key, TYPE & value) { int result = 0; - const PortableGroup::Value const * any = 0; + const PortableGroup::Value * any = 0; if ( decoder.find (key, any)) { result = ((*any) >>= value); diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp index a3720f2efab..7a676905862 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp @@ -29,7 +29,7 @@ TAO_Lookup<TRADER_LOCK_TYPE,MAP_LOCK_TYPE>::~TAO_Lookup (void) ! riter.done (); riter.advance ()) { - CosTrading::Admin::OctetSeq** old_seq = 0; + const CosTrading::Admin::OctetSeq** old_seq = 0; riter.next (old_seq); delete *old_seq; } @@ -52,7 +52,7 @@ query (const char *type, // If a federated query returns to us, ignore it to prevent // redundant results and infinite loops. - CosTrading::Admin::OctetSeq* request_id = 0; + const CosTrading::Admin::OctetSeq* request_id = 0; int check = this->seen_request_id (policies, request_id); if (check) @@ -69,7 +69,7 @@ query (const char *type, // If the importer has specified a starting trader, foward the // query. - CosTrading::TraderName* trader_name = + const CosTrading::TraderName* trader_name = policies.starting_trader (); if (! CORBA::is_nil (link_if) && trader_name != 0) @@ -729,7 +729,7 @@ template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE> CORBA::Boolean TAO_Lookup<TRADER_LOCK_TYPE,MAP_LOCK_TYPE>:: seen_request_id (TAO_Policies& policies, - CosTrading::Admin::OctetSeq*& seq) + const CosTrading::Admin::OctetSeq*& seq) { CORBA::Boolean return_value = 0; @@ -756,7 +756,7 @@ seen_request_id (TAO_Policies& policies, ! riter.done (); riter.advance ()) { - CosTrading::Admin::OctetSeq** old_seq = 0; + const CosTrading::Admin::OctetSeq** old_seq = 0; riter.next (old_seq); if (**old_seq == *seq) @@ -770,7 +770,7 @@ seen_request_id (TAO_Policies& policies, { if (this->request_ids_.size () == IDS_SAVED) { - CosTrading::Admin::OctetSeq* octet_seq = 0; + const CosTrading::Admin::OctetSeq* octet_seq = 0; this->request_ids_.dequeue_head (octet_seq); delete octet_seq; } diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h index 2b89164b9ed..5d17c007912 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h @@ -237,7 +237,7 @@ private: CosTrading::OfferSeq& offers); CORBA::Boolean seen_request_id (TAO_Policies& policies, - CosTrading::Admin::OctetSeq*& seq); + const CosTrading::Admin::OctetSeq*& seq); // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Lookup<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) @@ -248,7 +248,7 @@ private: /// A reference to the trader for obtaining offer maps. TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader_; - typedef ACE_Unbounded_Queue<CosTrading::Admin::OctetSeq*> Request_Ids; + typedef ACE_Unbounded_Queue<const CosTrading::Admin::OctetSeq*> Request_Ids; /// A list of recent request_id_stems Request_Ids request_ids_; diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp index 6b140767f01..0221981bceb 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp @@ -283,7 +283,7 @@ TAO_Property_Evaluator::property_value (int index) else { CORBA::TypeCode* type = dp_struct->returned_type.in (); - CORBA::Any& info = dp_struct->extra_info; + const CORBA::Any& info = dp_struct->extra_info; try { @@ -703,7 +703,7 @@ TAO_Policies::exact_type_match (void) const } -CosTrading::TraderName* +const CosTrading::TraderName* TAO_Policies::starting_trader (void) const { const CosTrading::TraderName* trader_name = 0; @@ -788,7 +788,7 @@ TAO_Policies::hop_count (void) const return this->ulong_prop (HOP_COUNT); } -CosTrading::Admin::OctetSeq* +const CosTrading::Admin::OctetSeq* TAO_Policies::request_id (void) const { const CosTrading::Admin::OctetSeq* request_id = 0; diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h index 15643f6040a..6e53cce11c5 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h @@ -371,7 +371,7 @@ public: * "starting_trader" policy with the first component removed. * END SPEC */ - CosTrading::TraderName* starting_trader (void) const; + const CosTrading::TraderName* starting_trader (void) const; /// Determine the link follow policy for this query overall. CosTrading::FollowOption link_follow_rule (void) const; @@ -411,7 +411,7 @@ public: /// Return the request_id passed to the query method across a link to /// another trader. - CosTrading::Admin::OctetSeq* request_id (void) const; + const CosTrading::Admin::OctetSeq* request_id (void) const; /// Policies to forward to the next trader in a federated query. void copy_to_pass (CosTrading::PolicySeq& policy_seq, diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp index 87df88547bb..7de7b2026d0 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp +++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.cpp @@ -890,7 +890,7 @@ IDL3_Client::component_port_test ( } int -IDL3_Client::provides_test (CORBA::ComponentIR::ProvidesDescriptionSeq &pds) +IDL3_Client::provides_test (const CORBA::ComponentIR::ProvidesDescriptionSeq &pds) { if (pds.length () != PROVIDES_LEN) { @@ -943,7 +943,7 @@ IDL3_Client::provides_test (CORBA::ComponentIR::ProvidesDescriptionSeq &pds) } int -IDL3_Client::uses_test (CORBA::ComponentIR::UsesDescriptionSeq &uds) +IDL3_Client::uses_test (const CORBA::ComponentIR::UsesDescriptionSeq &uds) { if (uds.length () != USES_LEN) { @@ -1012,7 +1012,7 @@ IDL3_Client::uses_test (CORBA::ComponentIR::UsesDescriptionSeq &uds) } int -IDL3_Client::event_port_test (CORBA::ComponentIR::EventPortDescriptionSeq &eds, +IDL3_Client::event_port_test (const CORBA::ComponentIR::EventPortDescriptionSeq &eds, CORBA::ULong seq_length, const char *port_type, const char **names, @@ -1585,7 +1585,7 @@ IDL3_Client::home_inheritance_test (CORBA::ComponentIR::HomeDef_var &hd) } int -IDL3_Client::home_factory_test (CORBA::ComponentIR::HomeDescription *hd) +IDL3_Client::home_factory_test (const CORBA::ComponentIR::HomeDescription *hd) { CORBA::ULong length = hd->factories.length (); @@ -1682,7 +1682,7 @@ IDL3_Client::home_factory_test (CORBA::ComponentIR::HomeDescription *hd) } int -IDL3_Client::home_finder_test (CORBA::ComponentIR::HomeDescription *hd) +IDL3_Client::home_finder_test (const CORBA::ComponentIR::HomeDescription *hd) { CORBA::ULong length = hd->finders.length (); diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.h b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.h index ba0fe18d121..01a16d4b4ac 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.h +++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/idl3_client.h @@ -60,11 +60,11 @@ private: int component_port_test (CORBA::ComponentIR::ComponentDef_var &); - int provides_test (CORBA::ComponentIR::ProvidesDescriptionSeq &); + int provides_test (const CORBA::ComponentIR::ProvidesDescriptionSeq &); - int uses_test (CORBA::ComponentIR::UsesDescriptionSeq &); + int uses_test (const CORBA::ComponentIR::UsesDescriptionSeq &); - int event_port_test (CORBA::ComponentIR::EventPortDescriptionSeq &, + int event_port_test (const CORBA::ComponentIR::EventPortDescriptionSeq &, CORBA::ULong seq_length, const char *port_type, const char **names, @@ -95,9 +95,9 @@ private: int home_inheritance_test (CORBA::ComponentIR::HomeDef_var &); - int home_factory_test (CORBA::ComponentIR::HomeDescription *); + int home_factory_test (const CORBA::ComponentIR::HomeDescription *); - int home_finder_test (CORBA::ComponentIR::HomeDescription *); + int home_finder_test (const CORBA::ComponentIR::HomeDescription *); private: /// Flag to output detailed error messages. diff --git a/TAO/tests/Bug_2678_Regression/server.cpp b/TAO/tests/Bug_2678_Regression/server.cpp index acc58355ae4..c81cf0d458c 100644 --- a/TAO/tests/Bug_2678_Regression/server.cpp +++ b/TAO/tests/Bug_2678_Regression/server.cpp @@ -30,7 +30,7 @@ AnySeq *Test_impl::RunTest(const AnySeq ¶ms) ACE_DEBUG ((LM_DEBUG, "RunTest: params.length == %d\n", params.length())); for (CORBA::ULong count = 0; count < params.length(); ++count) { - Container* container = 0; + const Container* container = 0; if (!(params[count] >>= container)) { ACE_ERROR ((LM_ERROR, "ERROR, failed extract\n")); diff --git a/TAO/tests/Codec/client.cpp b/TAO/tests/Codec/client.cpp index 70843f8f8d0..b9c96d35112 100644 --- a/TAO/tests/Codec/client.cpp +++ b/TAO/tests/Codec/client.cpp @@ -29,7 +29,7 @@ gen_wstring (CORBA::ULong max_length) } int -verify_data (Foo::Bar *original, Foo::Bar *extracted) +verify_data (Foo::Bar *original, const Foo::Bar *extracted) { if (!original || !extracted) return -1; diff --git a/TAO/tests/Param_Test/complex_any.cpp b/TAO/tests/Param_Test/complex_any.cpp index 0fbb1b12eb7..7d3330c2258 100644 --- a/TAO/tests/Param_Test/complex_any.cpp +++ b/TAO/tests/Param_Test/complex_any.cpp @@ -215,8 +215,8 @@ Test_Complex_Any::comp_engine (const CORBA::AnySeq *level2_in_seq, for (CORBA::ULong i = 0; i < level2_in_seq->length (); i++) { - CORBA::AnySeq *level3_in_seq; - CORBA::AnySeq *level3_test_seq; + const CORBA::AnySeq *level3_in_seq = 0; + const CORBA::AnySeq *level3_test_seq = 0; if (!((*level2_in_seq)[i] >>= level3_in_seq)) return 0; @@ -232,8 +232,8 @@ Test_Complex_Any::comp_engine (const CORBA::AnySeq *level2_in_seq, for (CORBA::ULong j = 0; j < level3_in_seq->length (); j ++) { - Param_Test::level4 *level4_in_struct; - Param_Test::level4 *level4_test_struct; + const Param_Test::level4 *level4_in_struct = 0; + const Param_Test::level4 *level4_test_struct = 0; if (!((*level3_in_seq)[j] >>= level4_in_struct)) return 0; @@ -263,8 +263,8 @@ Test_Complex_Any::comp_engine (const CORBA::AnySeq *level2_in_seq, if (!((*level6_test_any) >>= level7_test_any)) return 0; - Param_Test::level8 *level8_in_struct; - Param_Test::level8 *level8_test_struct; + const Param_Test::level8 *level8_in_struct = 0; + const Param_Test::level8 *level8_test_struct = 0; if (!((*level7_in_any) >>= level8_in_struct)) return 0; diff --git a/TAO/tests/Param_Test/param_test_i.cpp b/TAO/tests/Param_Test/param_test_i.cpp index 4993592dbb8..82b22d09cbd 100644 --- a/TAO/tests/Param_Test/param_test_i.cpp +++ b/TAO/tests/Param_Test/param_test_i.cpp @@ -701,10 +701,10 @@ Param_Test_i::test_any (const CORBA::Any &a1, Coffee_ptr coffee; Param_Test::Fixed_Array_forany array; CORBA::ShortSeq *ub_short_sequence; - Param_Test::Bounded_Short_Seq *bd_short_sequence; - Param_Test::Fixed_Struct *fixed_structure; - Param_Test::Big_Union *big_union; - Param_Test::Small_Union *small_union; + const Param_Test::Bounded_Short_Seq *bd_short_sequence; + const Param_Test::Fixed_Struct *fixed_structure; + const Param_Test::Big_Union *big_union; + const Param_Test::Small_Union *small_union; a2 = a1; a3 = new CORBA::Any (a1); @@ -795,7 +795,7 @@ Param_Test_i::test_any (const CORBA::Any &a1, } else if (a1 >>= big_union) { - Param_Test::Big_Union *bu_in, *bu_inout, *bu_out, *bu_ret; + const Param_Test::Big_Union *bu_in, *bu_inout, *bu_out, *bu_ret; a1 >>= bu_in; // Insert copies.... @@ -821,7 +821,7 @@ Param_Test_i::test_any (const CORBA::Any &a1, } else if (a1 >>= small_union) { - Param_Test::Small_Union *bu_in, *bu_inout, *bu_out, *bu_ret; + const Param_Test::Small_Union *bu_in, *bu_inout, *bu_out, *bu_ret; a1 >>= bu_in; // Insert copies.... diff --git a/TAO/tests/Param_Test/ub_struct_seq.cpp b/TAO/tests/Param_Test/ub_struct_seq.cpp index 4c68746f8b8..7770f7fd5f5 100644 --- a/TAO/tests/Param_Test/ub_struct_seq.cpp +++ b/TAO/tests/Param_Test/ub_struct_seq.cpp @@ -248,7 +248,7 @@ Test_Unbounded_Struct_Sequence::dii_req_invoke (CORBA::Request *req) req->invoke (); - Param_Test::PathSpec *tmp; + const Param_Test::PathSpec *tmp = 0; req->return_value () >>= tmp; this->ret_ = new Param_Test::PathSpec (*tmp); |