Browse Source

[2009] Fix narrowing warnings with GCC 4.7

Mukund Sivaraman 13 years ago
parent
commit
266ddad13b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/xfr/xfrout_client.cc

+ 2 - 1
src/lib/xfr/xfrout_client.cc

@@ -83,7 +83,8 @@ XfroutClient::sendXfroutRequestInfo(const int tcp_sock,
     // TODO: this shouldn't be blocking send, even though it's unlikely to
     // block.
     // converting the 16-bit word to network byte order.
-    const uint8_t lenbuf[2] = { msg_len >> 8, msg_len & 0xff };
+    const uint8_t lenbuf[2] = { static_cast<uint8_t>(msg_len >> 8),
+                                static_cast<uint8_t>(msg_len & 0xff) };
     if (send(impl_->socket_.native(), lenbuf, sizeof(lenbuf), 0) !=
         sizeof(lenbuf)) {
         isc_throw(XfroutError,