* net_win.c, net_wins.c, net_wipx.c: warning and compilation fixes.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@205 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-06-20 20:50:27 +00:00
parent febb164f0f
commit 79154d12ca
3 changed files with 7 additions and 8 deletions

View file

@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "net_loop.h" #include "net_loop.h"
#include "net_dgrm.h" #include "net_dgrm.h"
#include "net_ser.h"
net_driver_t net_drivers[MAX_NET_DRIVERS] = net_driver_t net_drivers[MAX_NET_DRIVERS] =
{ {

View file

@ -20,9 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// net_wins.c // net_wins.c
#include "winsock.h"
#include "quakedef.h" #include "quakedef.h"
#include "net_defs.h" #include "net_defs.h"
#include "winquake.h"
#define MAXHOSTNAMELEN 256 #define MAXHOSTNAMELEN 256
@ -90,7 +90,7 @@ static void WINS_GetLocalAddress (void)
myAddr = *(u_long *)local->h_addr_list[0]; myAddr = *(u_long *)local->h_addr_list[0];
addr = ntohl(myAddr); addr = ntohl(myAddr);
sprintf(my_tcpip_address, "%d.%d.%d.%d", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff); sprintf(my_tcpip_address, "%ld.%ld.%ld.%ld", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
} }

View file

@ -20,9 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
// net_wipx.c // net_wipx.c
#include "winsock.h"
#include "quakedef.h" #include "quakedef.h"
#include "net_defs.h" #include "net_defs.h"
#include "winquake.h"
#include <wsipx.h> #include <wsipx.h>
#include "net_wipx.h" #include "net_wipx.h"
@ -267,12 +267,12 @@ int WIPX_Write (int handle, byte *buf, int len, struct qsockaddr *addr)
int ret; int ret;
// build packet with sequence number // build packet with sequence number
*(int *)(&packetBuffer[0]) = sequence[handle]; memcpy(&packetBuffer[0], &sequence[handle], 4);
sequence[handle]++; sequence[handle]++;
memcpy(&packetBuffer[4], buf, len); memcpy(&packetBuffer[4], buf, len);
len += 4; len += 4;
ret = sendto (socketid, packetBuffer, len, 0, (struct sockaddr *)addr, sizeof(struct qsockaddr)); ret = sendto (socketid, (char *)packetBuffer, len, 0, (struct sockaddr *)addr, sizeof(struct qsockaddr));
if (ret == -1) if (ret == -1)
if (WSAGetLastError() == WSAEWOULDBLOCK) if (WSAGetLastError() == WSAEWOULDBLOCK)
return 0; return 0;
@ -345,12 +345,12 @@ int WIPX_GetSocketAddr (int handle, struct qsockaddr *addr)
{ {
int socketid = ipxsocket[handle]; int socketid = ipxsocket[handle];
int addrlen = sizeof(struct qsockaddr); int addrlen = sizeof(struct qsockaddr);
unsigned int a;
Q_memset(addr, 0, sizeof(struct qsockaddr)); Q_memset(addr, 0, sizeof(struct qsockaddr));
if (getsockname(socketid, (struct sockaddr *)addr, &addrlen) != 0) if (getsockname(socketid, (struct sockaddr *)addr, &addrlen) != 0)
{ {
int err = WSAGetLastError(); int err;
err = WSAGetLastError();
/* FIXME: what action should be taken?... */ /* FIXME: what action should be taken?... */
} }