From aa94a275c603e7e8bd65cf1b7440017217a86c17 Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Thu, 9 Jul 2015 11:15:37 -0600 Subject: Fixes compilation failures on MacOSX 10.10 * Replace old c-style casts with c++ casts * Added `-Wno-error=old-style-cast` to Protocol18x.cpp --- src/Endianness.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Endianness.h') diff --git a/src/Endianness.h b/src/Endianness.h index a415903a5..0e8bc8e99 100644 --- a/src/Endianness.h +++ b/src/Endianness.h @@ -2,7 +2,7 @@ #pragma once #undef ntohll -#define ntohll(x) ((((UInt64)ntohl((UInt32)x)) << 32) + ntohl(x >> 32)) +#define ntohll(x) (((static_cast(ntohl(static_cast(x)))) << 32) + ntohl(x >> 32)) @@ -13,7 +13,7 @@ inline UInt64 HostToNetwork8(const void * a_Value) { UInt64 buf; memcpy( &buf, a_Value, sizeof( buf)); - buf = (( ( (UInt64)htonl((UInt32)buf)) << 32) + htonl(buf >> 32)); + buf = (( ( static_cast(htonl(static_cast(buf)))) << 32) + htonl(buf >> 32)); return buf; } -- cgit v1.2.3