diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2006-07-17 17:24:15 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2006-07-17 17:24:15 +0000 |
commit | be010bf2c0571f64fe14c93ce9359a512c9730bf (patch) | |
tree | 728d674b6776b280ff44ff969bb0375835cf9933 | |
parent | 250ea7180feac26067327ee8ca27b856a734f48f (diff) | |
download | ATCD-be010bf2c0571f64fe14c93ce9359a512c9730bf.tar.gz |
ChangeLogTag:Mon Jul 17 17:49:41 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
-rw-r--r-- | TAO/ChangeLog | 17 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp | 17 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.cpp | 18 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Acceptor.cpp | 36 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Acceptor.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Acceptor.cpp | 18 |
10 files changed, 85 insertions, 53 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index a3d0b8bb433..c33f3be4872 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,20 @@ +Mon Jul 17 17:49:41 UTC 2006 Ossama Othman <ossama_othman at symantec dot com> + + * orbsvcs/orbsvcs/AV/AVStreams_i.cpp: + * orbsvcs/orbsvcs/AV/AV_Core.cpp: + * orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp: + * orbsvcs/orbsvcs/IFRService/Container_i.cpp: + * orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.cpp: + * orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp: + * tao/Strategies/DIOP_Acceptor.cpp: + * tao/Strategies/SHMIOP_Acceptor.cpp: + * tao/Strategies/UIOP_Acceptor.cpp: + + Use new ACE_CString::size_type type to hold string + position/index value, instead of "int". Addresses "comparison + between signed and unsigned" warnings. + + Mon Jul 17 14:46:26 UTC 2006 Ciju John <johnc@ociweb.com> * orbsvcs/orbsvcs/Event/ECG_Mcast_EH.cpp: diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp index 97756114183..3b21cf04246 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp @@ -5228,7 +5228,7 @@ TAO_Tokenizer::parse (const char *string, char delimiter) { ACE_CString new_string (string); u_int pos =0; - int slash_pos = 0; + ACE_CString::size_type slash_pos = 0; u_int count = 0; int result; while (pos < new_string.length ()) diff --git a/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp b/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp index 1525b981483..830f8fe5e98 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp @@ -1160,7 +1160,7 @@ char * TAO_AV_Core::get_flowname (const char *flow_spec_entry_str) { ACE_CString flow_spec_entry (flow_spec_entry_str); - int slash_pos = flow_spec_entry.find ('\\'); + ACE_CString::size_type slash_pos = flow_spec_entry.find ('\\'); ACE_CString flow_name; if (slash_pos != flow_spec_entry.npos) flow_name = flow_spec_entry.substring (0, slash_pos); diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp index 8d8cddc96f8..4d0bed9f1f8 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Acceptor.cpp @@ -832,18 +832,15 @@ TAO::HTIOP::Acceptor::parse_options (const char *str) // `option1=foo' // `option2=bar' - int begin = 0; - int end = -1; + ACE_CString::size_type begin = 0; + ACE_CString::size_type end = 0; for (CORBA::ULong j = 0; j < option_count; ++j) { - begin += end + 1; - if (j < option_count - 1) end = options.find (option_delimiter, begin); else - end = static_cast<CORBA::ULong> (len) - - begin; // Handle last endpoint differently + end = len; if (end == begin) ACE_ERROR_RETURN ((LM_ERROR, @@ -853,9 +850,9 @@ TAO::HTIOP::Acceptor::parse_options (const char *str) { ACE_CString opt = options.substring (begin, end); - int slot = opt.find ("="); + ACE_CString::size_type const slot = opt.find ("="); - if (slot == static_cast<int> (len - 1) + if (slot == len - 1 || slot == ACE_CString::npos) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) HTIOP option <%s> is ") @@ -880,7 +877,11 @@ TAO::HTIOP::Acceptor::parse_options (const char *str) ACE_TEXT ("(%P|%t) Invalid HTIOP option: <%s>\n"), name.c_str ()), -1); + + begin = end + 1; } + else + break; // No other options. } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp index e8810ebd680..b729699e35e 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/Container_i.cpp @@ -201,7 +201,7 @@ TAO_Container_i::lookup_i (const char *search_name ACE_TString section_name; int status = 0; int index = 0; - ssize_t pos = 0; + ACE_TString::size_type pos = 0; int so_far_so_good = 0; u_int kind = 0; CORBA::DefinitionKind def_kind = CORBA::dk_none; @@ -2425,7 +2425,7 @@ TAO_Container_i::update_refs (const char *path, "name", ref_name); - ssize_t pos = ref_name.find (this->repo_->extension ()); + ACE_TString::size_type pos = ref_name.find (this->repo_->extension ()); // If one of the names has been mangled by move(), fix it. if (pos != ACE_TString::npos) diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.cpp index bfe70ce38fd..1b3377b9f19 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.cpp @@ -282,7 +282,7 @@ TAO_UIPMC_Acceptor::parse_options (const char *str) // before the object key. for (size_t i = 0; i < len; ++i) if (options[i] == option_delimiter) - option_count++; + ++option_count; // The idea behind the following loop is to split the options into // (option, name) pairs. @@ -292,17 +292,15 @@ TAO_UIPMC_Acceptor::parse_options (const char *str) // `option1=foo' // `option2=bar' - int begin = 0; - int end = -1; + ACE_CString::size_type begin = 0; + ACE_CString::size_type end = 0; for (CORBA::ULong j = 0; j < option_count; ++j) { - begin += end + 1; - if (j < option_count - 1) end = options.find (option_delimiter, begin); else - end = static_cast<int> (len - begin); // Handle last endpoint differently + end = len; if (end == begin) ACE_ERROR_RETURN ((LM_ERROR, @@ -312,9 +310,9 @@ TAO_UIPMC_Acceptor::parse_options (const char *str) { ACE_CString opt = options.substring (begin, end); - int slot = opt.find ("="); + ACE_CString::size_type const slot = opt.find ("="); - if (slot == static_cast<int> (len - 1) + if (slot == len - 1 || slot == ACE_CString::npos) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) UIPMC option <%s> is ") @@ -344,7 +342,11 @@ TAO_UIPMC_Acceptor::parse_options (const char *str) ACE_TEXT ("TAO (%P|%t) Invalid UIPMC option: <%s>\n"), name.c_str ()), -1); + + begin = end + 1; } + else + break; // No other options. } return 0; } diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp index 15b50afd698..d242aef76a1 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp @@ -275,7 +275,7 @@ TAO_UIPMC_Profile::parse_string_i (const char *string ACE_CString ace_str (string, 0, 0); // Look for the group domain delimitor. - ssize_t pos = ace_str.find ('-'); + ACE_CString::size_type pos = ace_str.find ('-'); if (pos == ACE_CString::npos) { @@ -295,8 +295,8 @@ TAO_UIPMC_Profile::parse_string_i (const char *string // The group_id is terminated with a '-' or a '/'. // Skip past the last '-'. - pos++; - ssize_t end_pos = ace_str.find ('-',pos); + ++pos; + ACE_CString::size_type end_pos = ace_str.find ('-',pos); CORBA::Boolean parse_group_ref_version_flag = 0; diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp index b0dfb89101a..7ba2e43bbb6 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp @@ -694,29 +694,29 @@ TAO_DIOP_Acceptor::parse_options (const char *str) // `option1=foo' // `option2=bar' - ssize_t begin = 0; - ssize_t end = -1; + ACE_CString::size_type begin = 0; + ACE_CString::size_type end = 0; for (CORBA::ULong j = 0; j < option_count; ++j) { - begin += end + 1; - if (j < option_count - 1) end = options.find (option_delimiter, begin); else - end = (len - begin); // Handle last endpoint differently + end = len; if (end == begin) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) Zero length DIOP option.\n")), - -1); + { + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("TAO (%P|%t) Zero length DIOP option.\n")), + -1); + } else if (end != ACE_CString::npos) { ACE_CString opt = options.substring (begin, end); - ssize_t slot = opt.find ("="); + ACE_CString::size_type const slot = opt.find ("="); - if (slot == static_cast<ssize_t> (len - 1) + if (slot == len - 1 || slot == ACE_CString::npos) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) DIOP option <%s> is ") @@ -741,10 +741,18 @@ TAO_DIOP_Acceptor::parse_options (const char *str) -1); } else - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) Invalid DIOP option: <%s>\n"), - ACE_TEXT_CHAR_TO_TCHAR (name.c_str ())), - -1); + { + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("TAO (%P|%t) Invalid DIOP option: <%s>\n"), + ACE_TEXT_CHAR_TO_TCHAR (name.c_str ())), + -1); + } + + begin = end + 1; + } + else + { + break; // No other options. } } return 0; diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp index 5de6670b1a1..fd6d0859d16 100644 --- a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp @@ -441,7 +441,7 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) // before the object key. for (size_t i = 0; i < len; ++i) if (options[i] == option_delimiter) - option_count++; + ++option_count; // The idea behind the following loop is to split the options into // (option, name) pairs. @@ -451,17 +451,15 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) // `option1=foo' // `option2=bar' - int begin = 0; - int end = -1; + ACE_CString::size_type begin = 0; + ACE_CString::size_type end = 0; for (CORBA::ULong j = 0; j < option_count; ++j) { - begin += end + 1; - if (j < option_count - 1) end = options.find (option_delimiter, begin); else - end = static_cast <int>(len - begin); // Handle last endpoint differently + end = len; if (end == begin) ACE_ERROR_RETURN ((LM_ERROR, @@ -471,9 +469,9 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) { ACE_CString opt = options.substring (begin, end); - int slot = opt.find ("="); + ACE_CString::size_type const slot = opt.find ("="); - if (slot == static_cast <int> (len - 1) + if (slot == len - 1 || slot == ACE_CString::npos) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) SHMIOP option <%s> is ") @@ -502,7 +500,11 @@ TAO_SHMIOP_Acceptor::parse_options (const char *str) ACE_TEXT ("TAO (%P|%t) Invalid SHMIOP option: <%s>\n"), ACE_TEXT_CHAR_TO_TCHAR(name.c_str ())), -1); + + begin = end + 1; } + else + break; // No other options. } return 0; } diff --git a/TAO/tao/Strategies/UIOP_Acceptor.cpp b/TAO/tao/Strategies/UIOP_Acceptor.cpp index 87917221593..8c7701a150b 100644 --- a/TAO/tao/Strategies/UIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/UIOP_Acceptor.cpp @@ -422,17 +422,15 @@ TAO_UIOP_Acceptor::parse_options (const char *str) // `option1=foo' // `option2=bar' - int begin = 0; - int end = -1; + ACE_CString::size_type begin = 0; + ACE_CString::size_type end = 0; for (CORBA::ULong j = 0; j < option_count; ++j) { - begin += end + 1; - if (j < option_count - 1) end = options.find (option_delimiter, begin); else - end = len - begin; // Handle last endpoint differently + end = len; if (end == begin) ACE_ERROR_RETURN ((LM_ERROR, @@ -443,9 +441,9 @@ TAO_UIOP_Acceptor::parse_options (const char *str) ACE_CString opt = options.substring (begin, end); - const int slot = opt.find ("="); + ACE_CString::size_type const slot = opt.find ("="); - if (slot == static_cast<int> (len - 1) + if (slot == len - 1 || slot == ACE_CString::npos) ACE_ERROR_RETURN ((LM_ERROR, "TAO (%P|%t) UIOP option <%s> is " @@ -465,7 +463,7 @@ TAO_UIOP_Acceptor::parse_options (const char *str) if (name == "priority") { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("TAO (%P|%t) Invalid IIOP endpoint format: ") + ACE_TEXT ("TAO (%P|%t) Invalid UIOP endpoint format: ") ACE_TEXT ("endpoint priorities no longer supported. \n")), -1); } @@ -474,7 +472,11 @@ TAO_UIOP_Acceptor::parse_options (const char *str) "TAO (%P|%t) Invalid UIOP option: <%s>\n", name.c_str ()), -1); + + begin = end + 1; } + else + break; // No other options. } return 0; } |