From bc8019aa15a1e9357d9246369e2c3db658f06085 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Mon, 19 Aug 2013 07:07:19 +0300 Subject: fix some warnings --- include/enet/enet.h | 10 +++------- include/enet/unix.h | 5 +---- include/enet/win32.h | 5 +---- 3 files changed, 5 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/enet/enet.h b/include/enet/enet.h index 8d1c2c0..162b0f8 100644 --- a/include/enet/enet.h +++ b/include/enet/enet.h @@ -71,13 +71,9 @@ typedef enum _ENetSocketShutdown ENET_SOCKET_SHUTDOWN_READ_WRITE = 2 } ENetSocketShutdown; -enum -{ - ENET_HOST_ANY = 0, /**< specifies the default server host */ - ENET_HOST_BROADCAST = 0xFFFFFFFF, /**< specifies a subnet-wide broadcast */ - - ENET_PORT_ANY = 0 /**< specifies that a port should be automatically chosen */ -}; +#define ENET_HOST_ANY 0 +#define ENET_HOST_BROADCAST 0xFFFFFFFFU +#define ENET_PORT_ANY 0 /** * Portable internet address structure. diff --git a/include/enet/unix.h b/include/enet/unix.h index 3076faa..9683c09 100644 --- a/include/enet/unix.h +++ b/include/enet/unix.h @@ -18,10 +18,7 @@ typedef int ENetSocket; -enum -{ - ENET_SOCKET_NULL = -1 -}; +#define ENET_SOCKET_NULL -1 #define ENET_HOST_TO_NET_16(value) (htons (value)) /**< macro that converts host to net byte-order of a 16-bit value */ #define ENET_HOST_TO_NET_32(value) (htonl (value)) /**< macro that converts host to net byte-order of a 32-bit value */ diff --git a/include/enet/win32.h b/include/enet/win32.h index b7b6816..40fb803 100644 --- a/include/enet/win32.h +++ b/include/enet/win32.h @@ -19,10 +19,7 @@ typedef SOCKET ENetSocket; -enum -{ - ENET_SOCKET_NULL = INVALID_SOCKET -}; +#define ENET_SOCKET_NULL INVALID_SOCKET #define ENET_HOST_TO_NET_16(value) (htons (value)) #define ENET_HOST_TO_NET_32(value) (htonl (value)) -- cgit v1.2.3