From 6a99bb041dc70b0e04a2b05d6881c04f6f999d24 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Wed, 18 May 2016 12:02:30 -0700 Subject: [PATCH] Problem: implicit integer narrowing cast warnings. --- src/udp_engine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/udp_engine.cpp b/src/udp_engine.cpp index 3c963ab1..25b37271 100644 --- a/src/udp_engine.cpp +++ b/src/udp_engine.cpp @@ -167,9 +167,9 @@ void zmq::udp_engine_t::sockaddr_to_msg (zmq::msg_t *msg, sockaddr_in* addr) char* name = inet_ntoa(addr->sin_addr); char port[6]; - sprintf (port, "%d", (int)ntohs (addr->sin_port)); + sprintf (port, "%d", (int) ntohs (addr->sin_port)); - int size = strlen (name) + strlen (port) + 1 + 1; // Colon + NULL + int size = (int) strlen (name) + (int) strlen (port) + 1 + 1; // Colon + NULL int rc = msg->init_size (size); errno_assert (rc == 0); msg->set_flags (msg_t::more); @@ -188,7 +188,7 @@ int zmq::udp_engine_t::resolve_raw_address (char *name_, size_t length_) // Find delimiter, cannot use memrchr as it is not supported on windows if (length_ != 0) { - int chars_left = length_; + int chars_left = (int) length_; char *current_char = name_ + length_; do { if (*(--current_char) == ':') {