mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-31 14:39:55 +01:00
Merge pull request #3091 from sigiesec/fix-warnings-msvc
Problem: warnings in MSVC builds around size_t/int
This commit is contained in:
commit
15e8de2f88
@ -51,7 +51,7 @@ const struct sockaddr *zmq::ip_addr_t::as_sockaddr () const
|
|||||||
return &generic;
|
return &generic;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t zmq::ip_addr_t::sockaddr_len () const
|
socklen_t zmq::ip_addr_t::sockaddr_len () const
|
||||||
{
|
{
|
||||||
if (family () == AF_INET6) {
|
if (family () == AF_INET6) {
|
||||||
return sizeof (ipv6);
|
return sizeof (ipv6);
|
||||||
|
@ -48,7 +48,7 @@ union ip_addr_t
|
|||||||
uint16_t port () const;
|
uint16_t port () const;
|
||||||
|
|
||||||
const struct sockaddr *as_sockaddr () const;
|
const struct sockaddr *as_sockaddr () const;
|
||||||
size_t sockaddr_len () const;
|
socklen_t sockaddr_len () const;
|
||||||
|
|
||||||
void set_port (uint16_t);
|
void set_port (uint16_t);
|
||||||
|
|
||||||
|
@ -184,13 +184,14 @@ size_t zmq::mechanism_t::add_basic_properties (unsigned char *buf,
|
|||||||
size_t zmq::mechanism_t::basic_properties_len () const
|
size_t zmq::mechanism_t::basic_properties_len () const
|
||||||
{
|
{
|
||||||
const char *socket_type = socket_type_string (options.type);
|
const char *socket_type = socket_type_string (options.type);
|
||||||
int meta_len = 0;
|
size_t meta_len = 0;
|
||||||
|
|
||||||
for (std::map<std::string, std::string>::const_iterator it =
|
for (std::map<std::string, std::string>::const_iterator it =
|
||||||
options.app_metadata.begin ();
|
options.app_metadata.begin ();
|
||||||
it != options.app_metadata.end (); ++it)
|
it != options.app_metadata.end (); ++it) {
|
||||||
meta_len +=
|
meta_len +=
|
||||||
property_len (it->first.c_str (), strlen (it->second.c_str ()));
|
property_len (it->first.c_str (), strlen (it->second.c_str ()));
|
||||||
|
}
|
||||||
|
|
||||||
return property_len (ZMTP_PROPERTY_SOCKET_TYPE, strlen (socket_type))
|
return property_len (ZMTP_PROPERTY_SOCKET_TYPE, strlen (socket_type))
|
||||||
+ meta_len
|
+ meta_len
|
||||||
|
Loading…
x
Reference in New Issue
Block a user