summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Corino <mcorino@remedy.nl>2015-05-31 15:10:18 +0200
committerMartin Corino <mcorino@remedy.nl>2015-05-31 15:10:18 +0200
commitf2e0d66eb15f56231e44bd44c57b12e3d0b70765 (patch)
tree729fbaab18c58ee9f97b284cfa1050dbfddbfe4d
parent636d2e64ab16a78bb6e281326ef6bcf69ca08081 (diff)
downloadATCD-f2e0d66eb15f56231e44bd44c57b12e3d0b70765.tar.gz
Fix MSVC14 integer conversion warnings.
* TAO/TAO_IDL/ast/ast_structure.cpp: * TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp: * TAO/TAO_IDL/be/be_visitor_operation/operation.cpp: * TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp: * TAO/TAO_IDL/driver/drv_preproc.cpp:
-rw-r--r--TAO/TAO_IDL/ast/ast_structure.cpp4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/operation.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp8
-rw-r--r--TAO/TAO_IDL/driver/drv_preproc.cpp7
5 files changed, 13 insertions, 10 deletions
diff --git a/TAO/TAO_IDL/ast/ast_structure.cpp b/TAO/TAO_IDL/ast/ast_structure.cpp
index 3659ee654f0..3e7fc1f83a5 100644
--- a/TAO/TAO_IDL/ast/ast_structure.cpp
+++ b/TAO/TAO_IDL/ast/ast_structure.cpp
@@ -78,6 +78,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "utl_err.h"
#include "utl_indenter.h"
+#include "ace/Truncate.h"
+
AST_Structure::AST_Structure (UTL_ScopedName *n,
bool local,
bool abstract)
@@ -211,7 +213,7 @@ AST_Structure::member_count (void)
ACE_CDR::ULong
AST_Structure::nfields (void) const
{
- return this->fields_.size ();
+ return ACE_Utils::truncate_cast<ACE_CDR::ULong> (this->fields_.size ());
}
int
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
index 868bb06e8f0..359af9aab39 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
@@ -187,7 +187,7 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
/// Some compilers can't resolve the stream operator overload.
const char *op_name = opname.c_str ();
- ACE_CDR::ULong len = opname.length ();
+ ACE_CString::size_type len = opname.length ();
*os << be_nl_2
<< "TAO::Asynch_Invocation_Adapter _tao_call (" << be_idt << be_idt_nl
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
index 0da70f55a0f..479ee59a5a6 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
@@ -274,7 +274,7 @@ be_visitor_operation::gen_stub_operation_body (
/// Some compilers can't resolve the stream operator overload.
const char *lname = opname.c_str ();
- ACE_CDR::ULong len = opname.length ();
+ ACE_CString::size_type len = opname.length ();
*os << lname << "\"," << be_nl
<< len << "," << be_nl;
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
index c76598ca55f..d17c4be7e1b 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/struct_typecode.cpp
@@ -176,9 +176,9 @@ int
TAO::be_visitor_struct_typecode::gen_member_typecodes (AST_Structure * node)
{
AST_Field ** member_ptr = 0;
- size_t const count = node->nfields ();
+ ACE_CDR::ULong const count = node->nfields ();
- for (size_t i = 0; i < count; ++i)
+ for (ACE_CDR::ULong i = 0; i < count; ++i)
{
node->field (member_ptr, i);
@@ -218,10 +218,10 @@ int
TAO::be_visitor_struct_typecode::visit_members (AST_Structure * node)
{
AST_Field ** member_ptr = 0;
- size_t const count = node->nfields ();
+ ACE_CDR::ULong const count = node->nfields ();
TAO_OutStream & os = *this->ctx_->stream ();
- for (size_t i = 0; i < count; ++i)
+ for (ACE_CDR::ULong i = 0; i < count; ++i)
{
node->field (member_ptr, i);
diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp
index 1e0168f788e..6a8a0b3f8b6 100644
--- a/TAO/TAO_IDL/driver/drv_preproc.cpp
+++ b/TAO/TAO_IDL/driver/drv_preproc.cpp
@@ -78,6 +78,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ace/UUID.h"
#include "ace/Dirent.h"
#include "ace/OS_NS_sys_stat.h"
+#include "ace/Truncate.h"
// FUZZ: disable check_for_streams_include
#include "ace/streams.h"
@@ -171,7 +172,7 @@ DRV_cpp_calc_total_argsize(void)
unsigned long ix = 0;
while (DRV_arglist[ix] != 0)
{
- size += ACE_OS::strlen (DRV_arglist[ix]) + 1;
+ size += ACE_Utils::truncate_cast<unsigned long> (ACE_OS::strlen (DRV_arglist[ix]) + 1);
++ix;
}
return size;
@@ -182,7 +183,7 @@ static bool
DRV_get_line (FILE *file)
{
char *line = ACE_OS::fgets (drv_line,
- drv_line_size,
+ ACE_Utils::truncate_cast<int> (drv_line_size),
file);
if (!line || (!*line && feof (file)))
{
@@ -226,7 +227,7 @@ DRV_get_line (FILE *file)
}
line = ACE_OS::fgets (drv_line + len,
- drv_line_size - len,
+ ACE_Utils::truncate_cast<int> (drv_line_size - len),
file);
} while (line && *line);