diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Routing_Slip_Persistence_Manager.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Routing_Slip_Persistence_Manager.cpp | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Routing_Slip_Persistence_Manager.cpp b/TAO/orbsvcs/orbsvcs/Notify/Routing_Slip_Persistence_Manager.cpp index 5af000fc040..62915a67221 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Routing_Slip_Persistence_Manager.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Routing_Slip_Persistence_Manager.cpp @@ -327,16 +327,16 @@ Routing_Slip_Persistence_Manager::Block_Header::put_header( data[pos++] = static_cast<unsigned char> ((serial_number >> 8) & 0xff); data[pos++] = static_cast<unsigned char> ((serial_number >> 0) & 0xff); // Store next_overflow - data[pos++] = next_overflow >> 24; - data[pos++] = (next_overflow >> 16) & 0xff; - data[pos++] = (next_overflow >> 8) & 0xff; - data[pos++] = next_overflow & 0xff; + data[pos++] = static_cast<unsigned char> (next_overflow >> 24); + data[pos++] = static_cast<unsigned char> ((next_overflow >> 16) & 0xff); + data[pos++] = static_cast<unsigned char> ((next_overflow >> 8) & 0xff); + data[pos++] = static_cast<unsigned char> (next_overflow & 0xff); // Store header_type - data[pos++] = (header_type >> 8) & 0xff; - data[pos++] = header_type & 0xff; + data[pos++] = static_cast<unsigned char> ((header_type >> 8) & 0xff); + data[pos++] = static_cast<unsigned char> (header_type & 0xff); // Store data_size - data[pos++] = (data_size >> 8) & 0xff; - data[pos++] = data_size & 0xff; + data[pos++] = static_cast<unsigned char> ((data_size >> 8) & 0xff); + data[pos++] = static_cast<unsigned char> (data_size & 0xff); return pos; } @@ -386,10 +386,10 @@ Routing_Slip_Persistence_Manager::Routing_Slip_Header::put_header( unsigned char* data = psb.data(); // Store next_routing_slip_block - data[pos++] = next_routing_slip_block >> 24; - data[pos++] = (next_routing_slip_block >> 16) & 0xff; - data[pos++] = (next_routing_slip_block >> 8) & 0xff; - data[pos++] = next_routing_slip_block & 0xff; + data[pos++] = static_cast<unsigned char> (next_routing_slip_block >> 24); + data[pos++] = static_cast<unsigned char> ((next_routing_slip_block >> 16) & 0xff); + data[pos++] = static_cast<unsigned char> ((next_routing_slip_block >> 8) & 0xff); + data[pos++] = static_cast<unsigned char> (next_routing_slip_block & 0xff); // Store serial_number data[pos++] = static_cast<unsigned char> ((next_serial_number >> 56) & 0xff); data[pos++] = static_cast<unsigned char> ((next_serial_number >> 48) & 0xff); @@ -400,10 +400,10 @@ Routing_Slip_Persistence_Manager::Routing_Slip_Header::put_header( data[pos++] = static_cast<unsigned char> ((next_serial_number >> 8) & 0xff); data[pos++] = static_cast<unsigned char> ((next_serial_number >> 0) & 0xff); // Store event_block - data[pos++] = event_block >> 24; - data[pos++] = (event_block >> 16) & 0xff; - data[pos++] = (event_block >> 8) & 0xff; - data[pos++] = event_block & 0xff; + data[pos++] = static_cast<unsigned char> (event_block >> 24); + data[pos++] = static_cast<unsigned char> ((event_block >> 16) & 0xff); + data[pos++] = static_cast<unsigned char> ((event_block >> 8) & 0xff); + data[pos++] = static_cast<unsigned char> (event_block & 0xff); return pos; } @@ -579,7 +579,8 @@ Routing_Slip_Persistence_Manager::build_chain( mblk = mblk->cont(); remainder = this->fill_block(*first_block, pos, mblk, 0); } - first_header.data_size = data_size - remainder; + first_header.data_size = + static_cast<TAO_Notify::Routing_Slip_Persistence_Manager::Block_Size> (data_size - remainder); first_header.next_overflow = 0; Block_Header* prevhdr = &first_header; @@ -596,7 +597,8 @@ Routing_Slip_Persistence_Manager::build_chain( prevhdr->next_overflow = curblk->block_number(); prevhdr->put_header(*prevblk); pos = hdr->put_header(*curblk); - hdr->data_size = remainder; + hdr->data_size = + static_cast<TAO_Notify::Routing_Slip_Persistence_Manager::Block_Size> (remainder); size_t offset_into_msg = mblk->length() - remainder; remainder = this->fill_block(*curblk, pos, mblk, offset_into_msg); @@ -607,7 +609,8 @@ Routing_Slip_Persistence_Manager::build_chain( remainder = this->fill_block(*curblk, pos, mblk, 0); } - hdr->data_size -= remainder; + hdr->data_size = hdr->data_size - + static_cast<TAO_Notify::Routing_Slip_Persistence_Manager::Block_Size> (remainder); if (prevblk != first_block) { // allocator obtains ownership, so write out and delete the header |