From: Mikko Rasa Date: Thu, 19 Nov 2015 08:17:18 +0000 (+0200) Subject: Use a typecast to avoid a signedness mismatch warning X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=abc40062b2be394ce007711be98e221167317aa1;p=libs%2Fnet.git Use a typecast to avoid a signedness mismatch warning --- diff --git a/source/net/unix.cpp b/source/net/unix.cpp index 373b65a..cd1f414 100644 --- a/source/net/unix.cpp +++ b/source/net/unix.cpp @@ -26,7 +26,7 @@ UnixAddr::UnixAddr(const SysAddr &sa): throw logic_error("no unix sockets on windows"); #else const sockaddr_un &sau = reinterpret_cast(sa.addr); - if(sa.size>sizeof(sa_family_t)) + if(static_cast(sa.size)>sizeof(sa_family_t)) { abstract = (sau.sun_path[0]==0); path.assign(sau.sun_path+abstract, sa.size-sizeof(sa_family_t)-abstract);