Make more warnings go away on the SGI compiler.

This is part of SF patch #424992.
This commit is contained in:
Fred Drake 2001-07-19 21:29:49 +00:00
parent e5065290e7
commit dff3a37afd
4 changed files with 6 additions and 11 deletions

View File

@ -258,7 +258,6 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
*indexptr = end;
return Py_BuildValue("c", (char)x);
}
break;
case('E'): case('G'): case('L'): case('Q'):
case('U'): case('l'): case('u'):
@ -331,7 +330,6 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
/* Otherwise, return a string containing the group name */
return Py_BuildValue("s#", pattern+index, end-index);
}
break;
case('0'):
{
@ -354,7 +352,7 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
*indexptr = i;
return Py_BuildValue("c", (unsigned char)octval);
}
break;
case('1'): case('2'): case('3'): case('4'):
case('5'): case('6'): case('7'): case('8'):
case('9'):
@ -410,7 +408,6 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
return Py_BuildValue("i", pattern[index]-'0');
}
}
break;
default:
/* It's some unknown escape like \s, so return a string containing

View File

@ -332,7 +332,7 @@ staticforward PyTypeObject poll_Type;
static int
update_ufd_array(pollObject *self)
{
int i, j, pos;
int i, pos;
PyObject *key, *value;
self->ufd_len = PyDict_Size(self->dict);
@ -343,9 +343,9 @@ update_ufd_array(pollObject *self)
}
i = pos = 0;
while ((j = PyDict_Next(self->dict, &pos, &key, &value))) {
while (PyDict_Next(self->dict, &pos, &key, &value)) {
self->ufds[i].fd = PyInt_AsLong(key);
self->ufds[i].events = PyInt_AsLong(value);
self->ufds[i].events = (short)PyInt_AsLong(value);
i++;
}
self->ufd_uptodate = 1;

View File

@ -156,7 +156,7 @@ signal_alarm(PyObject *self, PyObject *args)
if (!PyArg_Parse(args, "i", &t))
return NULL;
/* alarm() returns the number of seconds remaining */
return PyInt_FromLong(alarm(t));
return PyInt_FromLong((long)alarm(t));
}
static char alarm_doc[] =

View File

@ -171,8 +171,6 @@ static PyMethodDef xreadlines_functions[] = {
DL_EXPORT(void)
initxreadlines(void)
{
PyObject *m;
XReadlinesObject_Type.ob_type = &PyType_Type;
m = Py_InitModule("xreadlines", xreadlines_functions);
Py_InitModule("xreadlines", xreadlines_functions);
}