Skip to content

Commit dff3a37

Browse files
committed
Make more warnings go away on the SGI compiler.
This is part of SF patch #424992.
1 parent e506529 commit dff3a37

4 files changed

Lines changed: 6 additions & 11 deletions

File tree

Modules/pcremodule.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
258258
*indexptr = end;
259259
return Py_BuildValue("c", (char)x);
260260
}
261-
break;
262261

263262
case('E'): case('G'): case('L'): case('Q'):
264263
case('U'): case('l'): case('u'):
@@ -331,7 +330,6 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
331330
/* Otherwise, return a string containing the group name */
332331
return Py_BuildValue("s#", pattern+index, end-index);
333332
}
334-
break;
335333

336334
case('0'):
337335
{
@@ -354,7 +352,7 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
354352
*indexptr = i;
355353
return Py_BuildValue("c", (unsigned char)octval);
356354
}
357-
break;
355+
358356
case('1'): case('2'): case('3'): case('4'):
359357
case('5'): case('6'): case('7'): case('8'):
360358
case('9'):
@@ -410,7 +408,6 @@ PyPcre_expand_escape(unsigned char *pattern, int pattern_len,
410408
return Py_BuildValue("i", pattern[index]-'0');
411409
}
412410
}
413-
break;
414411

415412
default:
416413
/* It's some unknown escape like \s, so return a string containing

Modules/selectmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ staticforward PyTypeObject poll_Type;
332332
static int
333333
update_ufd_array(pollObject *self)
334334
{
335-
int i, j, pos;
335+
int i, pos;
336336
PyObject *key, *value;
337337

338338
self->ufd_len = PyDict_Size(self->dict);
@@ -343,9 +343,9 @@ update_ufd_array(pollObject *self)
343343
}
344344

345345
i = pos = 0;
346-
while ((j = PyDict_Next(self->dict, &pos, &key, &value))) {
346+
while (PyDict_Next(self->dict, &pos, &key, &value)) {
347347
self->ufds[i].fd = PyInt_AsLong(key);
348-
self->ufds[i].events = PyInt_AsLong(value);
348+
self->ufds[i].events = (short)PyInt_AsLong(value);
349349
i++;
350350
}
351351
self->ufd_uptodate = 1;

Modules/signalmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ signal_alarm(PyObject *self, PyObject *args)
156156
if (!PyArg_Parse(args, "i", &t))
157157
return NULL;
158158
/* alarm() returns the number of seconds remaining */
159-
return PyInt_FromLong(alarm(t));
159+
return PyInt_FromLong((long)alarm(t));
160160
}
161161

162162
static char alarm_doc[] =

Modules/xreadlinesmodule.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ static PyMethodDef xreadlines_functions[] = {
171171
DL_EXPORT(void)
172172
initxreadlines(void)
173173
{
174-
PyObject *m;
175-
176174
XReadlinesObject_Type.ob_type = &PyType_Type;
177-
m = Py_InitModule("xreadlines", xreadlines_functions);
175+
Py_InitModule("xreadlines", xreadlines_functions);
178176
}

0 commit comments

Comments
 (0)