From 6d4c7182709b758782235857f22fd3632ba8df21 Mon Sep 17 00:00:00 2001 From: toms Date: Tue, 10 Apr 2007 14:34:04 +0000 Subject: Removed an ugly cast in socket.c Fixed Makefile (-Wno-unused-parameter was added twice with gcc4) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10205 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/socket.c | 4 ++-- src/common/socket.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/socket.c b/src/common/socket.c index 34c707827..6a742fce5 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -103,7 +103,7 @@ void set_defaultparse(ParseFunc defaultparse) /*====================================== * CORE : Socket options *--------------------------------------*/ -void set_nonblocking(int fd, int yes) +void set_nonblocking(int fd, unsigned long yes) { // TCP_NODELAY BOOL Disables the Nagle algorithm for send coalescing. if(MODE_NODELAY) @@ -111,7 +111,7 @@ void set_nonblocking(int fd, int yes) // FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s. // The argp parameter is zero if nonblocking is to be disabled. - if (ioctlsocket(fd, FIONBIO, (unsigned long*)&yes) != 0) + if (ioctlsocket(fd, FIONBIO, &yes) != 0) ShowError("Couldn't set the socket to non-blocking mode (code %d)!\n", s_errno); } diff --git a/src/common/socket.h b/src/common/socket.h index eae9baf72..41acbeabd 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -121,7 +121,7 @@ void socket_final(void); extern void flush_fifo(int fd); extern void flush_fifos(void); -extern void set_nonblocking(int fd, int yes); +extern void set_nonblocking(int fd, unsigned long yes); void set_defaultparse(ParseFunc defaultparse); -- cgit v1.2.3-70-g09d2