diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-02 14:26:40 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-02 14:26:40 +0000 |
commit | f209f89c297a4faa57f5a7dcee475d27c682c6bb (patch) | |
tree | 3095b62e341e390a58dd4b253f8fce785bc448a0 /TAO/tao/append.cpp | |
parent | c2042a1954314cba050b42ac7172b61dced7d39d (diff) | |
download | ATCD-f209f89c297a4faa57f5a7dcee475d27c682c6bb.tar.gz |
Initialized some vars that were causing Linux/egcs warnings in
TAO_Marshal_Objref::append().
Diffstat (limited to 'TAO/tao/append.cpp')
-rw-r--r-- | TAO/tao/append.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/TAO/tao/append.cpp b/TAO/tao/append.cpp index 153acc14a9a..475577f159a 100644 --- a/TAO/tao/append.cpp +++ b/TAO/tao/append.cpp @@ -264,7 +264,7 @@ TAO_Marshal_ObjRef::append (CORBA::TypeCode_ptr, // just need to be able to access such preloaded libraries here as // we unmarshal objrefs. - CORBA::ULong profiles; + CORBA::ULong profiles = 0; // get the count of profiles that follow. This will tell us the length of the // sequence @@ -274,27 +274,28 @@ TAO_Marshal_ObjRef::append (CORBA::TypeCode_ptr, // No profiles means a NIL objref. while (profiles-- != 0 && continue_append) { - CORBA::ULong tag; + CORBA::ULong tag = 0; // get the profile ID tag if ((continue_append = (src->read_ulong (tag) ? dest->write_ulong (tag) : 0)) == 0) continue; - CORBA::ULong length; + CORBA::ULong length = 0; if ((continue_append = (src->read_ulong (length) ? dest->write_ulong (length) : 0)) == 0) continue; // @@ This can be optimized! Pre-allocating on the destination // and then copying directly into that. - CORBA::Octet* body; - ACE_NEW_RETURN (body, CORBA::Octet[length], + CORBA::Octet* body = 0; + 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); - delete[] body; + delete [] body; } if (continue_append == 1) |