diff options
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/AnyTypeCode/Union_TypeCode.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/append.cpp | 14 | ||||
-rw-r--r-- | TAO/tao/AnyTypeCode/skip.cpp | 16 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_10.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_12.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Lite.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connection_Handler.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 78 | ||||
-rw-r--r-- | TAO/tao/PortableServer/POAManager.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/RTCORBA/Linear_Priority_Mapping.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/RTCORBA/Multi_Priority_Mapping.cpp | 26 | ||||
-rw-r--r-- | TAO/tao/RTCORBA/RT_ORB_Loader.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Acceptor.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Factory.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Strategies/advanced_resource.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/TAO_Internal.cpp | 8 |
19 files changed, 104 insertions, 101 deletions
diff --git a/TAO/tao/AnyTypeCode/Union_TypeCode.cpp b/TAO/tao/AnyTypeCode/Union_TypeCode.cpp index 25aba5c6340..fbbcb7dae78 100644 --- a/TAO/tao/AnyTypeCode/Union_TypeCode.cpp +++ b/TAO/tao/AnyTypeCode/Union_TypeCode.cpp @@ -301,8 +301,6 @@ TAO::TypeCode::Union<StringType, // ACE_CHECK_RETURN (CORBA::TypeCode::_nil ()); ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::TypeCode::_nil ()); - - ACE_NOTREACHED (return CORBA::TypeCode::_nil ()); } template <typename StringType, diff --git a/TAO/tao/AnyTypeCode/append.cpp b/TAO/tao/AnyTypeCode/append.cpp index 0c2f4ff4adf..36a8721fa7d 100644 --- a/TAO/tao/AnyTypeCode/append.cpp +++ b/TAO/tao/AnyTypeCode/append.cpp @@ -415,13 +415,13 @@ TAO_Marshal_Union::append (CORBA::TypeCode_ptr tc, ACE_CHECK_RETURN (TAO::TRAVERSE_STOP); // Save the discriminator value in a temporary variable... - CORBA::Short short_v; - CORBA::UShort ushort_v; - CORBA::Long long_v; - CORBA::ULong ulong_v; - CORBA::ULong enum_v; - CORBA::Char char_v; - CORBA::WChar wchar_v; + CORBA::Short short_v = CORBA::Short(); + CORBA::UShort ushort_v = CORBA::UShort(); + CORBA::Long long_v = CORBA::Long(); + CORBA::ULong ulong_v = CORBA::ULong(); + CORBA::ULong enum_v = CORBA::ULong(); + CORBA::Char char_v = CORBA::Char(); + CORBA::WChar wchar_v = CORBA::WChar(); CORBA::Boolean boolean_v = false; switch (kind) diff --git a/TAO/tao/AnyTypeCode/skip.cpp b/TAO/tao/AnyTypeCode/skip.cpp index 4fd48dfd789..dcad0cb9c3f 100644 --- a/TAO/tao/AnyTypeCode/skip.cpp +++ b/TAO/tao/AnyTypeCode/skip.cpp @@ -366,15 +366,15 @@ TAO_Marshal_Union::skip (CORBA::TypeCode_ptr tc, ACE_CHECK_RETURN (TAO::TRAVERSE_STOP); // Save the discriminator value in a temporary variable... - CORBA::Short short_v; - CORBA::UShort ushort_v; - CORBA::Long long_v; - CORBA::ULong ulong_v; - CORBA::ULong enum_v; - CORBA::Char char_v; - CORBA::WChar wchar_v; + CORBA::Short short_v = CORBA::Short(); + CORBA::UShort ushort_v = CORBA::UShort(); + CORBA::Long long_v = CORBA::Long(); + CORBA::ULong ulong_v = CORBA::ULong(); + CORBA::ULong enum_v = CORBA::ULong(); + CORBA::Char char_v = CORBA::Char(); + CORBA::WChar wchar_v = CORBA::WChar(); CORBA::Boolean boolean_v = false; - + switch (kind) { case CORBA::tk_short: diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 9e95891f644..3168fb0ce7b 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -1840,9 +1840,7 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, CORBA::ULong { return -1; } - } - - return -1; + } } /* @return -1 error, 0 ok, +1 outstanding fragments */ diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index fe1bd07d280..351ed8e21be 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -341,7 +341,7 @@ TAO_GIOP_Message_Generator_Parser_10::parse_request_header ( request.request_id (req_id); - CORBA::Octet response_flags; + CORBA::Octet response_flags = CORBA::Octet(); hdr_status = hdr_status && input.read_octet (response_flags); request.response_expected ((response_flags != 0)); diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp index e7b735e2faa..5fa498544dc 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp @@ -266,7 +266,7 @@ TAO_GIOP_Message_Generator_Parser_12::parse_request_header ( request.request_id (req_id); - CORBA::Octet response_flags; + CORBA::Octet response_flags = CORBA::Octet(); hdr_status = hdr_status && input.read_octet (response_flags); request.response_expected ((response_flags > 0)); diff --git a/TAO/tao/GIOP_Message_Lite.cpp b/TAO/tao/GIOP_Message_Lite.cpp index 5fbca6302d3..273b3a347b8 100644 --- a/TAO/tao/GIOP_Message_Lite.cpp +++ b/TAO/tao/GIOP_Message_Lite.cpp @@ -1347,7 +1347,7 @@ TAO_GIOP_Message_Lite::parse_request_header (TAO_ServerRequest &request) request.request_id (req_id); - CORBA::Octet response_flags; + CORBA::Octet response_flags = CORBA::Octet(); hdr_status = hdr_status && input.read_octet (response_flags); request.response_expected ((response_flags != 0)); diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 4a8898f27d6..af44c6ce8a4 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -989,7 +989,7 @@ TAO_IIOP_Acceptor::object_key (IOP::TaggedProfile &profile, #endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ CORBA::Octet major; - CORBA::Octet minor; + CORBA::Octet minor = CORBA::Octet(); // Read the version. We just read it here. We don't*do any* // processing. diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index 0d37b37f116..d74ee12594d 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -253,7 +253,7 @@ TAO_IIOP_Connection_Handler::close_connection (void) { struct linger lval; lval.l_onoff = 1; - lval.l_linger = linger; + lval.l_linger = (u_short)linger; if (this->peer ().set_option(SOL_SOCKET, SO_LINGER, diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index d5f0cfee092..ef6d268da98 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -390,7 +390,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) //////////////////////////////////////////////////////////////// // begin with the 'parameterless' flags // //////////////////////////////////////////////////////////////// - if ((current_arg = arg_shifter.get_the_parameter + if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDottedDecimalAddresses")))) { // Use dotted decimal addresses @@ -400,7 +400,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNoServerSideNameLookups")))) { // Don't look up the host name for incoming connections @@ -409,7 +409,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNameServicePort")))) { // Specify the port number for the NameService. @@ -419,7 +419,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBMulticastDiscoveryEndpoint")))) { // Specify mcast address:port@network_interface for the @@ -432,7 +432,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNodelay")))) { // Use TCP_NODELAY or not. @@ -441,7 +441,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-ORBKeepalive")))) { // Use SO_KEEPALIVE or not. @@ -450,7 +450,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBTradingServicePort")))) { // Specify the port number for the TradingService. @@ -459,7 +459,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBImplRepoServicePort")))) { // Specify the multicast port number for the Implementation @@ -468,7 +468,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBRcvSock")))) { // @@ All protocol implementation may not use sockets, so @@ -481,7 +481,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBSndSock")))) { // @@ All protocol implementation may not use sockets, so @@ -493,7 +493,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBObjRefStyle")))) { // Specifies the style of printed objrefs: URL or IOR @@ -523,7 +523,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBCollocationStrategy")))) { // Specify which collocation policy we want to use. @@ -535,7 +535,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBCollocation")))) { // Specify whether we want to optimize against collocation @@ -567,7 +567,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBPreferredInterfaces")))) { if (this->orb_params ()->preferred_interfaces ( @@ -581,7 +581,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBEnforcePreferredInterfaces")))) { int enforce_pref_interfaces = ACE_OS::atoi (current_arg); @@ -616,7 +616,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } #endif /* ACE_HAS_IPV6 */ - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBCDRTradeoff")))) { cdr_tradeoff = ACE_OS::atoi (current_arg); @@ -627,7 +627,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) // A new <ObjectID>:<IOR> mapping has been specified. This will be // used by the resolve_initial_references (). - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBInitRef")))) { const ACE_TCHAR *pos = ACE_OS::strchr (current_arg, '='); @@ -664,7 +664,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) } arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDefaultInitRef")))) { // Set the list of prefixes from -ORBDefaultInitRef. @@ -672,14 +672,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBStdProfileComponents")))) { std_profile_components = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBResources")))) { ACE_DEBUG ((LM_WARNING, @@ -688,7 +688,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBLogFile")))) { // redirect all ACE_DEBUG and ACE_ERROR output to a file @@ -740,7 +740,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBVerboseLogging")))) { unsigned long verbose_logging = ACE_OS::atoi (current_arg); @@ -765,7 +765,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) (ACE_LOG_MSG->*flagop)(value); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBUseIMR")))) { // Use IR or not. @@ -773,14 +773,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBIMREndpointsInIOR")))) { this->imr_endpoints_in_ior_ = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBid")))) { // The ORBid is actually set in ORB_init(), and then passed @@ -799,7 +799,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBServerId")))) { // The this->server_id_ is to uniquely identify a server to @@ -809,14 +809,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBLingerTimeout")))) { linger = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBEndpoint")))) { // Each "endpoint" is of the form: @@ -845,7 +845,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBListenEndpoints")))) { // This option is similar to the -ORBEndPoint option. May be @@ -860,10 +860,10 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter - (ACE_TEXT("-ORBLaneEndpoint"))) || - (current_arg = arg_shifter.get_the_parameter - (ACE_TEXT("-ORBLaneListenEndpoints")))) + else if ((0 != (current_arg = arg_shifter.get_the_parameter + (ACE_TEXT("-ORBLaneEndpoint")))) || + (0 != (current_arg = arg_shifter.get_the_parameter + (ACE_TEXT("-ORBLaneListenEndpoints"))))) { // This option is similar to the -ORBEndPoint option but // specifies endpoints for each lane. @@ -885,7 +885,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNoProprietaryActivation")))) { // This option can be used to set to not use any proprietary @@ -898,7 +898,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), -1); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBUseSharedProfile")))) { this->orb_params ()->shared_profile @@ -906,14 +906,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBNegotiateCodesets")))) { negotiate_codesets = (ACE_OS::atoi (current_arg)); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBSingleReadOptimization")))) { this->orb_params ()->single_read_optimization @@ -921,7 +921,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBDisableRTCollocation")))) { int disable_rt_collocation = ACE_OS::atoi (current_arg); @@ -932,7 +932,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] ACE_ENV_ARG_DECL) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_LIB_TEXT("-ORBUseLocalMemoryPool")))) { this->use_local_memory_pool_ = (0 != ACE_OS::atoi (current_arg)); diff --git a/TAO/tao/PortableServer/POAManager.cpp b/TAO/tao/PortableServer/POAManager.cpp index 7eba8059a4f..a4c999bbd1a 100644 --- a/TAO/tao/PortableServer/POAManager.cpp +++ b/TAO/tao/PortableServer/POAManager.cpp @@ -154,7 +154,8 @@ TAO_POA_Manager::adapter_manager_state_changed (PortableServer::POAManager::Stat ACE_ENV_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - PortableInterceptor::AdapterState adapter_state = state; + PortableInterceptor::AdapterState adapter_state = + static_cast<PortableInterceptor::AdapterState> (state); TAO_IORInterceptor_Adapter *ior_adapter = this->object_adapter_.orb_core ().ior_interceptor_adapter (); diff --git a/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp b/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp index b965edd8d07..de53baf576f 100644 --- a/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp +++ b/TAO/tao/RTCORBA/Continuous_Priority_Mapping.cpp @@ -47,7 +47,7 @@ TAO_Continuous_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, current_native_priority = next_native_priority; } - native_priority = current_native_priority; + native_priority = static_cast<RTCORBA::NativePriority> (current_native_priority); return 1; #else diff --git a/TAO/tao/RTCORBA/Linear_Priority_Mapping.cpp b/TAO/tao/RTCORBA/Linear_Priority_Mapping.cpp index cfc239023b6..f6889d5a7c5 100644 --- a/TAO/tao/RTCORBA/Linear_Priority_Mapping.cpp +++ b/TAO/tao/RTCORBA/Linear_Priority_Mapping.cpp @@ -60,11 +60,11 @@ TAO_Linear_Priority_Mapping::to_native ( / (RTCORBA::maxPriority - RTCORBA::minPriority)); // Now, find the value corresponding to this index. - native_priority = this->min_; + native_priority = static_cast<RTCORBA::NativePriority> (this->min_); for (int i = 2; i <= native_priority_index; ++i) { - native_priority = ACE_Sched_Params::next_priority (this->policy_, - native_priority); + native_priority = static_cast<RTCORBA::NativePriority> + (ACE_Sched_Params::next_priority (this->policy_, native_priority)); } return 1; @@ -114,10 +114,9 @@ TAO_Linear_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priority, int delta = total - 1; if (delta != 0) { - corba_priority = - RTCORBA::minPriority - + ((RTCORBA::maxPriority - RTCORBA::minPriority) - * (native_priority_index - 1) / delta); + corba_priority = static_cast<RTCORBA::Priority> (RTCORBA::minPriority + + ((RTCORBA::maxPriority - RTCORBA::minPriority) + * (native_priority_index - 1) / delta)); } else { diff --git a/TAO/tao/RTCORBA/Multi_Priority_Mapping.cpp b/TAO/tao/RTCORBA/Multi_Priority_Mapping.cpp index 6a2b51943e4..b53c0995b31 100644 --- a/TAO/tao/RTCORBA/Multi_Priority_Mapping.cpp +++ b/TAO/tao/RTCORBA/Multi_Priority_Mapping.cpp @@ -92,7 +92,7 @@ TAO_Multi_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, if (corba_priority == base_corba_priority_) { // If this is the highest priority endpoint, then just give it the highest priority corba base priority - native_priority = base_native_priority_; + native_priority = static_cast<RTCORBA::NativePriority> (base_native_priority_); } else { @@ -100,11 +100,13 @@ TAO_Multi_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, { if ( this->min_ < this->max_ ) { - native_priority = ( (corba_priority - base_corba_priority_) / priority_spacing_ ) + base_native_priority_; + native_priority = static_cast<RTCORBA::NativePriority> + (((corba_priority - base_corba_priority_) / priority_spacing_) + base_native_priority_); } else { - native_priority = ( (base_corba_priority_ - corba_priority) / priority_spacing_ ) + base_native_priority_; + native_priority = static_cast<RTCORBA::NativePriority> + (((base_corba_priority_ - corba_priority) / priority_spacing_) + base_native_priority_); } } else @@ -129,9 +131,10 @@ TAO_Multi_Priority_Mapping::to_native (RTCORBA::Priority corba_priority, last_priority = this->base_native_priority_; for (int current_ndx = 0; current_ndx < priority_ndx; current_ndx++) { - native_priority = ACE_Sched_Params::previous_priority (this->policy_, - last_priority, - ACE_SCOPE_THREAD); + native_priority = static_cast<RTCORBA::NativePriority> + (ACE_Sched_Params::previous_priority (this->policy_, + last_priority, + ACE_SCOPE_THREAD)); } } } @@ -160,7 +163,7 @@ TAO_Multi_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priority, if (native_priority == base_native_priority_) { // If this is the highest priority endpoint, then just give it the highest priority corba base priority - corba_priority = base_corba_priority_; + corba_priority = static_cast<RTCORBA::Priority> (base_corba_priority_); } else { @@ -168,11 +171,13 @@ TAO_Multi_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priority, { if ( this->min_ < this->max_ ) { - corba_priority = ( (native_priority - base_native_priority_) * priority_spacing_ ) + base_corba_priority_; + corba_priority = static_cast<RTCORBA::Priority> + (((native_priority - base_native_priority_) * priority_spacing_) + base_corba_priority_); } else { - corba_priority = ( (base_native_priority_ - native_priority) * priority_spacing_ ) + base_corba_priority_; + corba_priority = static_cast<RTCORBA::Priority> + (((base_native_priority_ - native_priority) * priority_spacing_) + base_corba_priority_); } } else @@ -225,7 +230,8 @@ TAO_Multi_Priority_Mapping::to_CORBA (RTCORBA::NativePriority native_priority, priority_ndx++; } - corba_priority = base_corba_priority_ - priority_ndx; + corba_priority = static_cast<RTCORBA::Priority> + (base_corba_priority_ - priority_ndx); } } diff --git a/TAO/tao/RTCORBA/RT_ORB_Loader.cpp b/TAO/tao/RTCORBA/RT_ORB_Loader.cpp index 00f21ce77e0..381da1bd572 100644 --- a/TAO/tao/RTCORBA/RT_ORB_Loader.cpp +++ b/TAO/tao/RTCORBA/RT_ORB_Loader.cpp @@ -52,7 +52,7 @@ TAO_RT_ORB_Loader::init (int argc, while (arg_shifter.is_anything_left ()) { const ACE_TCHAR *current_arg = 0; - if ((current_arg = arg_shifter.get_the_parameter + if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBPriorityMapping")))) { const ACE_TCHAR *name = current_arg; @@ -75,7 +75,7 @@ TAO_RT_ORB_Loader::init (int argc, name)); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBSchedPolicy")))) { const ACE_TCHAR *name = current_arg; @@ -104,7 +104,7 @@ TAO_RT_ORB_Loader::init (int argc, name)); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBScopePolicy")))) { const ACE_TCHAR *name = current_arg; @@ -121,7 +121,7 @@ TAO_RT_ORB_Loader::init (int argc, name)); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-RTORBNetworkPriorityMapping")))) { const ACE_TCHAR *name = current_arg; @@ -131,7 +131,7 @@ TAO_RT_ORB_Loader::init (int argc, TAO_RT_ORBInitializer::TAO_NETWORK_PRIORITY_MAPPING_LINEAR; arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-RTORBDynamicThreadIdleTimeout")))) { const ACE_TCHAR *name = current_arg; diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp index e217355811a..2e527cea8ec 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp @@ -615,7 +615,8 @@ TAO_DIOP_Acceptor::object_key (IOP::TaggedProfile &profile, profile.profile_data.length ()); #endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */ - CORBA::Octet major, minor; + CORBA::Octet major; + CORBA::Octet minor = CORBA::Octet(); // Read the version. We just read it here. We don't*do any* // processing. diff --git a/TAO/tao/Strategies/SHMIOP_Factory.cpp b/TAO/tao/Strategies/SHMIOP_Factory.cpp index 0b75ccda628..27cca45b226 100644 --- a/TAO/tao/Strategies/SHMIOP_Factory.cpp +++ b/TAO/tao/Strategies/SHMIOP_Factory.cpp @@ -82,12 +82,12 @@ TAO_SHMIOP_Protocol_Factory::init (int argc, { const ACE_TCHAR *current_arg = 0; - if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-MMAPFileSize")))) + if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-MMAPFileSize")))) { this->min_bytes_ = ACE_OS::atoi (current_arg); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-MMAPFilePrefix")))) + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-MMAPFilePrefix")))) { this->mmap_prefix_ = ACE::strnew (current_arg); arg_shifter.consume_arg (); diff --git a/TAO/tao/Strategies/advanced_resource.cpp b/TAO/tao/Strategies/advanced_resource.cpp index fb44555a925..18378302d4d 100644 --- a/TAO/tao/Strategies/advanced_resource.cpp +++ b/TAO/tao/Strategies/advanced_resource.cpp @@ -130,7 +130,7 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv) -1); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBReactorLock")))) { ACE_DEBUG ((LM_DEBUG, @@ -144,7 +144,7 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBReactorType")))) { if (ACE_OS::strcasecmp (current_arg, @@ -186,7 +186,7 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBInputCDRAllocator")))) { if (ACE_OS::strcasecmp (current_arg, @@ -208,7 +208,7 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBAMHResponseHandlerAllocator")))) { if (ACE_OS::strcasecmp (current_arg, @@ -228,7 +228,7 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBAMIResponseHandlerAllocator")))) { if (ACE_OS::strcasecmp (current_arg, @@ -248,7 +248,7 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT("-ORBReactorThreadQueue")))) { if (ACE_OS::strcasecmp (current_arg, diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp index bef50c3cf33..8cb753d3ea4 100644 --- a/TAO/tao/TAO_Internal.cpp +++ b/TAO/tao/TAO_Internal.cpp @@ -163,7 +163,7 @@ TAO::ORB::open_services (int &argc, ACE_TCHAR **argv) ACE::debug (1); arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBDebugLevel")))) { TAO_debug_level = @@ -183,7 +183,7 @@ TAO::ORB::open_services (int &argc, ACE_TCHAR **argv) arg_shifter.consume_arg (); } // Continue with flags that accept parameters. - else if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConfDirective")))) + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConfDirective")))) { len = svc_config_argv.length (); svc_config_argv.length (len + 2); // 2 arguments to add @@ -197,7 +197,7 @@ TAO::ORB::open_services (int &argc, ACE_TCHAR **argv) arg_shifter.consume_arg (); } - else if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConf")))) + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBSvcConf")))) { // Specify the name of the svc.conf file to be used. @@ -231,7 +231,7 @@ TAO::ORB::open_services (int &argc, ACE_TCHAR **argv) arg_shifter.consume_arg(); } - else if ((current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBServiceConfigLoggerKey")))) + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBServiceConfigLoggerKey")))) { len = svc_config_argv.length (); svc_config_argv.length (len + 2); // 2 arguments to add |