Clean up some warnings from the SGI compiler.

This is part of SF patch #434992.
This commit is contained in:
Fred Drake 2001-07-19 21:16:41 +00:00
parent 6a16ea07b8
commit e5065290e7
1 changed files with 3 additions and 3 deletions

View File

@ -573,7 +573,7 @@ setipaddr(char* name, struct sockaddr_in * addr_ret)
static PyObject * static PyObject *
makeipaddr(struct sockaddr_in *addr) makeipaddr(struct sockaddr_in *addr)
{ {
long x = ntohl(addr->sin_addr.s_addr); unsigned long x = ntohl(addr->sin_addr.s_addr);
char buf[100]; char buf[100];
sprintf(buf, "%d.%d.%d.%d", sprintf(buf, "%d.%d.%d.%d",
(int) (x>>24) & 0xff, (int) (x>>16) & 0xff, (int) (x>>24) & 0xff, (int) (x>>16) & 0xff,
@ -2086,13 +2086,13 @@ PySocket_inet_aton(PyObject *self, PyObject *args)
/* Have to use inet_addr() instead */ /* Have to use inet_addr() instead */
char *ip_addr; char *ip_addr;
long packed_addr; unsigned long packed_addr;
if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) { if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) {
return NULL; return NULL;
} }
#ifdef USE_GUSI1 #ifdef USE_GUSI1
packed_addr = (long)inet_addr(ip_addr).s_addr; packed_addr = inet_addr(ip_addr).s_addr;
#else #else
packed_addr = inet_addr(ip_addr); packed_addr = inet_addr(ip_addr);
#endif #endif