mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Fix some problems that a picky SGI compiler reported. Two were benign
(unreachable break after a return) but one was a real bug: ReadFrames() was getting a bogus framecount because of a missing '&'.
This commit is contained in:
parent
e32d1537f0
commit
eaa1ed6b42
1 changed files with 1 additions and 3 deletions
|
@ -289,12 +289,10 @@ python2param(int resource, ALpv *param, PyObject *value, ALparamInfo *pinfo)
|
||||||
case AL_ENUM_ELEM:
|
case AL_ENUM_ELEM:
|
||||||
return python2elem(value, (void *) ¶m->value.i,
|
return python2elem(value, (void *) ¶m->value.i,
|
||||||
pinfo->elementType);
|
pinfo->elementType);
|
||||||
break;
|
|
||||||
case AL_INT64_ELEM:
|
case AL_INT64_ELEM:
|
||||||
case AL_FIXED_ELEM:
|
case AL_FIXED_ELEM:
|
||||||
return python2elem(value, (void *) ¶m->value.ll,
|
return python2elem(value, (void *) ¶m->value.ll,
|
||||||
pinfo->elementType);
|
pinfo->elementType);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
PyErr_SetString(ErrorObject, "unknown element type");
|
PyErr_SetString(ErrorObject, "unknown element type");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -912,7 +910,7 @@ alp_ReadFrames(self, args)
|
||||||
int ch;
|
int ch;
|
||||||
ALconfig c;
|
ALconfig c;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "i", framecount))
|
if (!PyArg_ParseTuple(args, "i", &framecount))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (framecount < 0) {
|
if (framecount < 0) {
|
||||||
PyErr_SetString(ErrorObject, "negative framecount");
|
PyErr_SetString(ErrorObject, "negative framecount");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue