diff options
author | Martin Corino <mcorino@remedy.nl> | 2015-05-28 13:43:18 +0200 |
---|---|---|
committer | Martin Corino <mcorino@remedy.nl> | 2015-05-28 13:43:18 +0200 |
commit | 4cc58ce93b93e07f2d73228ad7c621c7fccbd2f6 (patch) | |
tree | 16af8be681f6f312a297e954207d709bb7b722c0 /ACE/apps | |
parent | a94947b7106d3da8ea549c730629553ac4d4c3a0 (diff) | |
download | ATCD-4cc58ce93b93e07f2d73228ad7c621c7fccbd2f6.tar.gz |
Changes to fix integer type conversion warnings.
* ACE/ace/ETCL/ETCL_y.cpp:
* ACE/ace/XML_Utils/XercesString.cpp:
* ACE/apps/gperf/src/Gen_Perf.cpp:
* ACE/apps/gperf/src/List_Node.cpp:
* ACE/apps/gperf/src/Options.cpp:
Diffstat (limited to 'ACE/apps')
-rw-r--r-- | ACE/apps/gperf/src/Gen_Perf.cpp | 3 | ||||
-rw-r--r-- | ACE/apps/gperf/src/List_Node.cpp | 2 | ||||
-rw-r--r-- | ACE/apps/gperf/src/Options.cpp | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/ACE/apps/gperf/src/Gen_Perf.cpp b/ACE/apps/gperf/src/Gen_Perf.cpp index e56ca40e44d..7c46c1ba6a7 100644 --- a/ACE/apps/gperf/src/Gen_Perf.cpp +++ b/ACE/apps/gperf/src/Gen_Perf.cpp @@ -27,6 +27,7 @@ #include "ace/OS_NS_time.h" #include "ace/OS_NS_stdio.h" #include "ace/OS_Memory.h" +#include "ace/Truncate.h" /// Current release version. extern const char *version_string; @@ -77,7 +78,7 @@ Gen_Perf::compute_disjoint_union (char *set1, char *set2, char *set3) set3++; } *set3 = '\0'; - return set3 - base; + return ACE_Utils::truncate_cast<int> (set3 - base); } /// Sort the UNION_SET in increasing frequency of occurrence. This diff --git a/ACE/apps/gperf/src/List_Node.cpp b/ACE/apps/gperf/src/List_Node.cpp index 037f2406435..018f66db6b7 100644 --- a/ACE/apps/gperf/src/List_Node.cpp +++ b/ACE/apps/gperf/src/List_Node.cpp @@ -117,7 +117,7 @@ List_Node::List_Node (char *k, int len) *ptr = '\0'; // Sort the KEYSIG items alphabetically. - sort (keysig, ptr - keysig); + sort (keysig, ACE_Utils::truncate_cast<int> (ptr - keysig)); } List_Node::~List_Node (void) diff --git a/ACE/apps/gperf/src/Options.cpp b/ACE/apps/gperf/src/Options.cpp index 6809f86e999..c93e8dc62e4 100644 --- a/ACE/apps/gperf/src/Options.cpp +++ b/ACE/apps/gperf/src/Options.cpp @@ -27,6 +27,7 @@ #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_stdlib.h" +#include "ace/Truncate.h" /// These need to appear before the global class instantiation, since /// they are static members with a default constructor that initializes @@ -518,7 +519,7 @@ Options::parse_args (int argc, ACE_TCHAR *argv[]) *l_key_pos = EOS; - total_keysig_size_ = (l_key_pos - key_positions_); + total_keysig_size_ = ACE_Utils::truncate_cast<u_int> (l_key_pos - key_positions_); if (total_keysig_size_ == 0) ACE_ERROR_RETURN ((LM_ERROR, "No keys selected.\n%r", |