summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-26 20:25:15 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-26 20:25:15 +0000
commitf3ec1b905961448460c093282126976e35e410b4 (patch)
treea8b8cbf9b688d6df226955bd785fe257c55930e8 /TAO
parent8605c4b5cfb078bc87120991274fd9d38bd315ac (diff)
downloadATCD-f3ec1b905961448460c093282126976e35e410b4.tar.gz
Small modifications to get rid of all MSVC level 4 warnings.
Mostly casting return values from integer to CORBA::Boolean and the like.
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tao/Any.cpp12
-rw-r--r--TAO/tao/CDR_Interpreter.cpp8
-rw-r--r--TAO/tao/DynAny_i.cpp2
-rw-r--r--TAO/tao/GIOP.cpp12
-rw-r--r--TAO/tao/GIOP_Server_Request.cpp14
-rw-r--r--TAO/tao/IIOP_Connector.cpp2
-rw-r--r--TAO/tao/ORB.cpp18
-rw-r--r--TAO/tao/ORB_Core.cpp10
-rw-r--r--TAO/tao/Object.cpp14
-rw-r--r--TAO/tao/Object_Adapter.cpp4
-rw-r--r--TAO/tao/POA.i4
-rw-r--r--TAO/tao/Pluggable.cpp2
-rw-r--r--TAO/tao/Principal.cpp4
-rw-r--r--TAO/tao/Stub.i2
-rw-r--r--TAO/tao/Typecode.h2
-rw-r--r--TAO/tao/Typecode.i2
-rw-r--r--TAO/tao/ValueBase.i4
-rw-r--r--TAO/tao/append.cpp30
-rw-r--r--TAO/tao/decode.cpp6
-rw-r--r--TAO/tao/skip.cpp4
20 files changed, 85 insertions, 71 deletions
diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp
index 07f9bd16a39..e6462dc24b0 100644
--- a/TAO/tao/Any.cpp
+++ b/TAO/tao/Any.cpp
@@ -888,7 +888,9 @@ CORBA_Any::operator>>= (CORBA::Any &a) const
&a,
0,
ACE_TRY_ENV);
- return (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) ? 1 : 0;
+ return (CORBA::Boolean) ((retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ? 1
+ : 0);
}
}
else
@@ -990,7 +992,9 @@ CORBA_Any::operator>>= (CORBA::TypeCode_ptr &tc) const
0,
ACE_TRY_ENV);
ACE_TRY_CHECK;
- return (retval == CORBA::TypeCode::TRAVERSE_CONTINUE) ? 1 : 0;
+ return (CORBA::Boolean) ((retval == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ? 1
+ : 0);
}
}
else
@@ -1263,7 +1267,9 @@ CORBA_Any::operator>>= (to_object obj) const
// Because of the CORBA 2.3 change mentioned above, there is no
// need to assign to this->value_.
- return (status == CORBA::TypeCode::TRAVERSE_CONTINUE) ? 1 : 0;;
+ return (CORBA::Boolean) ((status == CORBA::TypeCode::TRAVERSE_CONTINUE)
+ ? 1
+ : 0);
}
}
else
diff --git a/TAO/tao/CDR_Interpreter.cpp b/TAO/tao/CDR_Interpreter.cpp
index 70e944d816b..8551bc1a008 100644
--- a/TAO/tao/CDR_Interpreter.cpp
+++ b/TAO/tao/CDR_Interpreter.cpp
@@ -1055,17 +1055,15 @@ TAO_CDR_Interpreter::calc_union_attr_is_var_sized_member
(TAO_InputCDR *stream,
CORBA::Boolean &flag)
{
- CORBA::ULong temp;
+ CORBA::Long temp;
flag = 0;
// Get the tk_ "kind" field
- if (stream->read_ulong (temp) == 0)
+ if (stream->read_long (temp) == 0)
// Error.
return -1;
- CORBA::TCKind kind = (CORBA::TCKind) temp;
-
- switch (kind)
+ switch (temp)
{
case CORBA::tk_null:
case CORBA::tk_void:
diff --git a/TAO/tao/DynAny_i.cpp b/TAO/tao/DynAny_i.cpp
index e7ccfafc6bd..1f6c41f1509 100644
--- a/TAO/tao/DynAny_i.cpp
+++ b/TAO/tao/DynAny_i.cpp
@@ -220,7 +220,7 @@ CORBA::Boolean
TAO_DynAny_i::seek (CORBA::Long slot,
CORBA::Environment &)
{
- return slot == 0 ? 1 : 0;
+ return (CORBA::Boolean) (slot == 0 ? 1 : 0);
}
// Nothing to rewind in this class.
diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp
index 490cafc4964..ae2c42602be 100644
--- a/TAO/tao/GIOP.cpp
+++ b/TAO/tao/GIOP.cpp
@@ -307,7 +307,7 @@ operator<< (TAO_OutputCDR &cdr,
++i)
cdr << x[i];
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
CORBA::Boolean
@@ -327,7 +327,7 @@ operator>> (TAO_InputCDR &cdr,
++i)
cdr >> x[i];
}
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
CORBA::Boolean
@@ -1459,7 +1459,7 @@ TAO_GIOP::start_message_std (const TAO_GIOP_Version &version,
msg.write_octet (version.major);
msg.write_octet (version.minor);
msg.write_octet (TAO_ENCAP_BYTE_ORDER);
- msg.write_octet (type);
+ msg.write_octet ((CORBA::Octet) type);
// Write a dummy <size> later it is set to the right value...
CORBA::ULong size = 0;
@@ -1480,7 +1480,7 @@ TAO_GIOP::start_message_lite (const TAO_GIOP_Version &,
CORBA::ULong size = 0;
msg.write_ulong (size);
- msg.write_octet (type);
+ msg.write_octet ((CORBA::Octet) type);
return 1;
}
@@ -1583,8 +1583,8 @@ TAO_GIOP::parse_header_std (TAO_InputCDR &input,
}
else
{
- state.byte_order = buf[TAO_GIOP_MESSAGE_FLAGS_OFFSET] & 0x01;
- state.more_fragments = buf[TAO_GIOP_MESSAGE_FLAGS_OFFSET] & 0x02;
+ state.byte_order = (CORBA::Octet) (buf[TAO_GIOP_MESSAGE_FLAGS_OFFSET] & 0x01);
+ state.more_fragments = (CORBA::Octet) (buf[TAO_GIOP_MESSAGE_FLAGS_OFFSET] & 0x02);
if (TAO_debug_level > 2
&& state.giop_version.minor == 1
&& (buf[TAO_GIOP_MESSAGE_FLAGS_OFFSET] & ~0x3) != 0)
diff --git a/TAO/tao/GIOP_Server_Request.cpp b/TAO/tao/GIOP_Server_Request.cpp
index 14d91565b0f..c864aa1041b 100644
--- a/TAO/tao/GIOP_Server_Request.cpp
+++ b/TAO/tao/GIOP_Server_Request.cpp
@@ -87,7 +87,7 @@ TAO_GIOP_ServerRequest::parse_header_std (void)
TAO_InputCDR& input = *this->incoming_;
input >> this->service_info_;
- CORBA::Boolean hdr_status = input.good_bit ();
+ CORBA::Boolean hdr_status = (CORBA::Boolean) input.good_bit ();
// Get the rest of the request header ...
@@ -98,7 +98,7 @@ TAO_GIOP_ServerRequest::parse_header_std (void)
// the reference count on the CDR message block, because this key
// will not outlive the request (or the message block).
- CORBA::Long key_length;
+ CORBA::Long key_length = 0;
hdr_status = hdr_status && input.read_long (key_length);
if (hdr_status)
{
@@ -110,7 +110,7 @@ TAO_GIOP_ServerRequest::parse_header_std (void)
if (input.char_translator () == 0)
{
- CORBA::ULong length;
+ CORBA::ULong length = 0;
hdr_status = hdr_status && input.read_ulong (length);
if (hdr_status)
{
@@ -138,7 +138,7 @@ TAO_GIOP_ServerRequest::parse_header_std (void)
if (hdr_status)
{
input >> this->requesting_principal_.out ();
- hdr_status = input.good_bit ();
+ hdr_status = (CORBA::Boolean) input.good_bit ();
}
return hdr_status ? 0 : -1;
@@ -149,7 +149,7 @@ TAO_GIOP_ServerRequest::parse_header_lite (void)
{
TAO_InputCDR& input = *this->incoming_;
- CORBA::Boolean hdr_status = input.good_bit ();
+ CORBA::Boolean hdr_status = (CORBA::Boolean) input.good_bit ();
// Get the rest of the request header ...
@@ -160,7 +160,7 @@ TAO_GIOP_ServerRequest::parse_header_lite (void)
// the reference count on the CDR message block, because this key
// will not outlive the request (or the message block).
- CORBA::Long key_length;
+ CORBA::Long key_length = 0;
hdr_status = hdr_status && input.read_long (key_length);
if (hdr_status)
{
@@ -172,7 +172,7 @@ TAO_GIOP_ServerRequest::parse_header_lite (void)
if (input.char_translator () == 0)
{
- CORBA::ULong length;
+ CORBA::ULong length = 0;
hdr_status = hdr_status && input.read_ulong (length);
if (hdr_status)
{
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp
index c1b655ec1f4..16067fc3cb8 100644
--- a/TAO/tao/IIOP_Connector.cpp
+++ b/TAO/tao/IIOP_Connector.cpp
@@ -195,7 +195,7 @@ TAO_IIOP_Connector::preconnect (const char *preconnects)
*sep = '\0';
tport = sep + 1;
- dest.set (ACE_OS::atoi (tport), thost);
+ dest.set ((u_short) ACE_OS::atoi (tport), thost);
dests.push (dest);
}
else
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index d45e1e55747..9fe5fc732ae 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -483,7 +483,7 @@ CORBA_ORB::resolve_service (const char *service_name,
ACE_OS::getenv ("NameServicePort");
if (port_number != 0)
- port = ACE_OS::atoi (port_number);
+ port = (u_short) ACE_OS::atoi (port_number);
else
port = TAO_DEFAULT_NAME_SERVER_REQUEST_PORT;
}
@@ -544,7 +544,7 @@ CORBA_ORB::resolve_trading_service (ACE_Time_Value *timeout,
const char *port_number = ACE_OS::getenv ("TradingServicePort");
if (port_number != 0)
- port = ACE_OS::atoi (port_number);
+ port = (u_short) ACE_OS::atoi (port_number);
else
port = TAO_DEFAULT_TRADING_SERVER_REQUEST_PORT;
}
@@ -603,7 +603,7 @@ CORBA_ORB::resolve_implrepo_service (ACE_Time_Value *timeout,
const char *port_number = ACE_OS::getenv ("ImplRepoServicePort");
if (port_number != 0)
- port = ACE_OS::atoi (port_number);
+ port = (u_short) ACE_OS::atoi (port_number);
else
port = TAO_DEFAULT_IMPLREPO_SERVER_REQUEST_PORT;
}
@@ -658,11 +658,11 @@ CORBA_ORB::multicast_query (char *&buf,
{
// Convert the acceptor port into network byte order.
ACE_UINT16 response_port =
- ACE_HTONS (my_addr.get_port_number ());
+ (ACE_UINT16) ACE_HTONS (my_addr.get_port_number ());
// Length of service name we will send.
CORBA::Short data_len =
- ACE_HTONS (ACE_OS::strlen (service_name) + 1);
+ (CORBA::Short) ACE_HTONS (ACE_OS::strlen (service_name) + 1);
// Vector we will send. It contains: 1) length of service
// name string, 2)port on which we are listening for
@@ -740,7 +740,7 @@ CORBA_ORB::multicast_query (char *&buf,
{
// Allocate more space for the ior if we don't
// have enough.
- ior_len = ACE_NTOHS (ior_len);
+ ior_len = (CORBA::Short) ACE_NTOHS (ior_len);
if (ior_len > TAO_DEFAULT_IOR_SIZE)
{
buf = CORBA::string_alloc (ior_len);
@@ -1626,7 +1626,7 @@ CORBA_ORB::url_ior_string_to_object (const char* str,
ACE_NEW_THROW_EX (obj,
CORBA_Object (data,
servant,
- collocated),
+ (CORBA::Boolean) collocated),
CORBA::NO_MEMORY ());
ACE_CHECK_RETURN (CORBA::Object::_nil ());
@@ -1823,7 +1823,7 @@ operator<< (TAO_OutputCDR& cdr, const TAO_opaque& x)
else
cdr.write_octet_array_mb (x.mb ());
#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
CORBA::Boolean
@@ -1839,7 +1839,7 @@ operator>>(TAO_InputCDR& cdr, TAO_opaque& x)
x.mb ()->wr_ptr (x.mb ()->rd_ptr () + length);
cdr.skip_bytes (length);
#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
// *************************************************************
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index e7c0e194762..f93f32d391a 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -158,7 +158,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
ACE_Env_Value<int> defport ("TAO_DEFAULT_SERVER_PORT",
TAO_DEFAULT_SERVER_PORT);
ACE_CString host;
- CORBA::UShort port = defport;
+ CORBA::UShort port = (CORBA::UShort) defport;
// @@ GIOPLite should be an alternative ORB Messaging protocols, fredk
int giop_lite = 0;
@@ -404,7 +404,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
arg_shifter.consume_arg ();
if (arg_shifter.is_parameter_next ())
{
- ns_port = ACE_OS::atoi (arg_shifter.get_current ());
+ ns_port = (CORBA::UShort) ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
}
}
@@ -428,7 +428,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
arg_shifter.consume_arg ();
if (arg_shifter.is_parameter_next ())
{
- ts_port = ACE_OS::atoi (arg_shifter.get_current ());
+ ts_port = (CORBA::UShort) ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
}
}
@@ -452,7 +452,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
arg_shifter.consume_arg ();
if (arg_shifter.is_parameter_next ())
{
- ir_port = ACE_OS::atoi (arg_shifter.get_current ());
+ ir_port = (CORBA::UShort) ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
}
}
@@ -473,7 +473,7 @@ TAO_ORB_Core::init (int &argc, char *argv[])
{
// We really shouldn't limit this to being specified as
// an int, but oh well for now.
- port = ACE_OS::atoi (arg_shifter.get_current ());
+ port = (CORBA::UShort) ACE_OS::atoi (arg_shifter.get_current ());
arg_shifter.consume_arg ();
}
}
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 13ffd4454ed..6b8e9cd116c 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -476,7 +476,7 @@ operator<< (TAO_OutputCDR& cdr, const CORBA_Object* x)
cdr.write_ulong (1);
cdr.write_char ('\0');
cdr.write_ulong (0);
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
TAO_Stub *stubobj = x->_stubobj ();
@@ -503,7 +503,7 @@ operator<< (TAO_OutputCDR& cdr, const CORBA_Object* x)
if (p->encode (cdr) == 0)
return 0;
}
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
CORBA::Boolean
@@ -521,7 +521,7 @@ operator>> (TAO_InputCDR& cdr, CORBA_Object*& x)
if (profile_count == 0)
{
x = CORBA::Object::_nil ();
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
// get a profile container to store all profiles in the IOR.
@@ -578,14 +578,18 @@ operator>> (TAO_InputCDR& cdr, CORBA_Object*& x)
collocated = 1;
// Create a new CORBA_Object and give it the TAO_Stub just created.
- ACE_NEW_RETURN (x, CORBA_Object (objdata, servant, collocated), 0);
+ ACE_NEW_RETURN (x,
+ CORBA_Object (objdata,
+ servant,
+ (CORBA::Boolean) collocated),
+ 0);
// the corba proxy would have already incremented the reference count on
// the objdata. So we decrement it here by 1 so that the objdata is now
// fully owned by the corba_proxy that was created.
// objdata->_decr_refcnt ();
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
// ****************************************************************
diff --git a/TAO/tao/Object_Adapter.cpp b/TAO/tao/Object_Adapter.cpp
index 3984e9fc011..78563422f9d 100644
--- a/TAO/tao/Object_Adapter.cpp
+++ b/TAO/tao/Object_Adapter.cpp
@@ -596,11 +596,11 @@ TAO_Object_Adapter::poa_name_iterator::poa_name_iterator (int begin,
const CORBA::Octet *folded_buffer)
: size_ (size),
folded_buffer_ (folded_buffer),
- last_separator_ (~0)
+ last_separator_ ((CORBA::ULong) ~0)
{
if (begin)
{
- this->position_ = ~0;
+ this->position_ = (CORBA::ULong) ~0;
this->operator++ ();
}
else
diff --git a/TAO/tao/POA.i b/TAO/tao/POA.i
index ce527e6d073..7e88ed480c0 100644
--- a/TAO/tao/POA.i
+++ b/TAO/tao/POA.i
@@ -460,7 +460,7 @@ TAO_POA::creation_time (void)
ACE_INLINE CORBA::Boolean
TAO_POA::system_id (void)
{
- return this->system_id_;
+ return (CORBA::Boolean) this->system_id_;
}
@@ -474,7 +474,7 @@ TAO_POA::root (void)
ACE_INLINE CORBA::Boolean
TAO_POA::persistent (void)
{
- return this->persistent_;
+ return (CORBA::Boolean) this->persistent_;
}
ACE_INLINE const ACE_CString &
diff --git a/TAO/tao/Pluggable.cpp b/TAO/tao/Pluggable.cpp
index 973d7dfe61b..8e9b2869ba9 100644
--- a/TAO/tao/Pluggable.cpp
+++ b/TAO/tao/Pluggable.cpp
@@ -122,7 +122,7 @@ TAO_Unknown_Profile::is_equivalent (const TAO_Profile* other_profile)
const TAO_Unknown_Profile *op =
ACE_dynamic_cast (const TAO_Unknown_Profile*, other_profile);
- return (this->body_ == op->body_);
+ return (CORBA::Boolean) (this->body_ == op->body_);
}
CORBA::ULong
diff --git a/TAO/tao/Principal.cpp b/TAO/tao/Principal.cpp
index ce7cf946db0..63e4ae4cfc8 100644
--- a/TAO/tao/Principal.cpp
+++ b/TAO/tao/Principal.cpp
@@ -35,7 +35,7 @@ operator<< (TAO_OutputCDR& cdr, CORBA_Principal* x)
{
cdr.write_ulong (0);
}
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
CORBA::Boolean
@@ -53,5 +53,5 @@ operator>> (TAO_InputCDR& cdr, CORBA_Principal*& x)
x->id.length (length);
cdr.read_octet_array (x->id.get_buffer (), length);
}
- return cdr.good_bit ();
+ return (CORBA::Boolean) cdr.good_bit ();
}
diff --git a/TAO/tao/Stub.i b/TAO/tao/Stub.i
index f7cc43103d0..53a06275e85 100644
--- a/TAO/tao/Stub.i
+++ b/TAO/tao/Stub.i
@@ -199,7 +199,7 @@ TAO_Stub::set_valid_profile (void)
ACE_INLINE CORBA::Boolean
TAO_Stub::valid_profile (void)
{
- return profile_success_;
+ return (CORBA::Boolean) profile_success_;
}
ACE_INLINE TAO_Profile *
diff --git a/TAO/tao/Typecode.h b/TAO/tao/Typecode.h
index 92d596b63ed..724b6346181 100644
--- a/TAO/tao/Typecode.h
+++ b/TAO/tao/Typecode.h
@@ -248,7 +248,7 @@ public:
CORBA::Long byte_order_;
// The byte order in the encapsulated stream.
- CORBA::TCKind kind_;
+ CORBA::Long kind_;
// the TypeCode kind
CORBA::TypeCode_ptr parent_;
diff --git a/TAO/tao/Typecode.i b/TAO/tao/Typecode.i
index a9bc37c5203..f3c8727faa1 100644
--- a/TAO/tao/Typecode.i
+++ b/TAO/tao/Typecode.i
@@ -37,7 +37,7 @@ CORBA::TypeCode::_nil (void)
ACE_INLINE CORBA::TCKind
CORBA_TypeCode::kind (CORBA::Environment &) const
{
- return this->kind_;
+ return (CORBA::TCKind) this->kind_;
}
// Returns true if the two typecodes are identical
diff --git a/TAO/tao/ValueBase.i b/TAO/tao/ValueBase.i
index 4117def9904..cb17c79c899 100644
--- a/TAO/tao/ValueBase.i
+++ b/TAO/tao/ValueBase.i
@@ -84,7 +84,7 @@ TAO_OBV_GIOP_Flags::is_value_tag (CORBA::ULong tag)
ACE_INLINE CORBA::Boolean
TAO_OBV_GIOP_Flags:: has_codebase_url(CORBA::ULong tag)
{
- return (tag & Codebase_url);
+ return (CORBA::Boolean) (tag & Codebase_url);
}
ACE_INLINE CORBA::Boolean
@@ -108,7 +108,7 @@ TAO_OBV_GIOP_Flags::has_list_type_info (CORBA::ULong tag)
ACE_INLINE CORBA::Boolean
TAO_OBV_GIOP_Flags:: is_chunked (CORBA::ULong tag)
{
- return (tag & 8);
+ return (CORBA::Boolean) (tag & 8);
}
ACE_INLINE CORBA::Boolean
diff --git a/TAO/tao/append.cpp b/TAO/tao/append.cpp
index 475577f159a..c26c6947fe0 100644
--- a/TAO/tao/append.cpp
+++ b/TAO/tao/append.cpp
@@ -153,7 +153,9 @@ TAO_Marshal_TypeCode::append (CORBA::TypeCode_ptr,
// Decode the "kind" field of the typecode from the src for further
// use. However, also write it back into the destination
- continue_append = (src->read_ulong (kind) ? dest->write_ulong (kind) : 0);
+ continue_append = (CORBA::Boolean) (src->read_ulong (kind)
+ ? dest->write_ulong (kind)
+ : 0);
if (continue_append == 1)
{
@@ -268,8 +270,9 @@ TAO_Marshal_ObjRef::append (CORBA::TypeCode_ptr,
// get the count of profiles that follow. This will tell us the length of the
// sequence
- continue_append = (src->read_ulong (profiles) ?
- dest->write_ulong (profiles) : 0);
+ continue_append = (CORBA::Boolean) (src->read_ulong (profiles)
+ ? dest->write_ulong (profiles)
+ : 0);
// No profiles means a NIL objref.
while (profiles-- != 0 && continue_append)
@@ -277,13 +280,15 @@ TAO_Marshal_ObjRef::append (CORBA::TypeCode_ptr,
CORBA::ULong tag = 0;
// get the profile ID tag
- if ((continue_append = (src->read_ulong (tag) ?
- dest->write_ulong (tag) : 0)) == 0)
+ if ((continue_append = (CORBA::Boolean) (src->read_ulong (tag)
+ ? dest->write_ulong (tag)
+ : 0)) == 0)
continue;
CORBA::ULong length = 0;
- if ((continue_append = (src->read_ulong (length)
- ? dest->write_ulong (length) : 0)) == 0)
+ if ((continue_append = (CORBA::Boolean) (src->read_ulong (length)
+ ? dest->write_ulong (length)
+ : 0)) == 0)
continue;
// @@ This can be optimized! Pre-allocating on the destination
@@ -292,9 +297,9 @@ TAO_Marshal_ObjRef::append (CORBA::TypeCode_ptr,
ACE_NEW_RETURN (body,
CORBA::Octet[length],
CORBA::TypeCode::TRAVERSE_STOP);
- continue_append = (src->read_octet_array (body, length)
- ? dest->write_octet_array (body, length)
- : 0);
+ continue_append = (CORBA::Boolean) (src->read_octet_array (body, length)
+ ? dest->write_octet_array (body, length)
+ : 0);
delete [] body;
}
@@ -562,8 +567,9 @@ TAO_Marshal_Sequence::append (CORBA::TypeCode_ptr tc,
// here, on the "be gracious in what you accept" principle. We
// don't generate illegal sequences (i.e. length > bounds).
- continue_append = (src->read_ulong (bounds) ?
- dest->write_ulong (bounds) : 0);
+ continue_append = (CORBA::Boolean) (src->read_ulong (bounds)
+ ? dest->write_ulong (bounds)
+ : 0);
if (continue_append)
{
diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp
index 6cb581ac6cc..2635ddea42c 100644
--- a/TAO/tao/decode.cpp
+++ b/TAO/tao/decode.cpp
@@ -445,7 +445,7 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
-1 * (offset - 4));
- continue_decoding = indir_stream.good_bit ();
+ continue_decoding = (CORBA::Boolean) indir_stream.good_bit ();
// Get "kind" and length of target typecode
//
@@ -454,8 +454,8 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
// typecode -- not the right assumption; see how the
// TypeCode interpreter does it.
- CORBA::ULong indir_kind;
- CORBA::ULong indir_len;
+ CORBA::ULong indir_kind = 0;
+ CORBA::ULong indir_len = 0;
// retrieve the typecode kind
if (continue_decoding)
diff --git a/TAO/tao/skip.cpp b/TAO/tao/skip.cpp
index 83eba3cb119..22da1d525b8 100644
--- a/TAO/tao/skip.cpp
+++ b/TAO/tao/skip.cpp
@@ -560,7 +560,7 @@ TAO_Marshal_Sequence::skip (CORBA::TypeCode_ptr tc,
while (bounds-- && continue_skipping == 1)
{
- continue_skipping = stream->skip (tc2, ACE_TRY_ENV);
+ continue_skipping = (CORBA::Boolean) stream->skip (tc2, ACE_TRY_ENV);
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
}
if (continue_skipping)
@@ -601,7 +601,7 @@ TAO_Marshal_Array::skip (CORBA::TypeCode_ptr tc,
while (bounds-- && continue_skipping == 1)
{
- continue_skipping = stream->skip (tc2, ACE_TRY_ENV);
+ continue_skipping = (CORBA::Boolean) stream->skip (tc2, ACE_TRY_ENV);
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
}