mirror of https://github.com/python/cpython
SF but #417587: compiler warnings compiling 2.1.
Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
This commit is contained in:
parent
9dfe4cdfa4
commit
cf96de052f
|
@ -818,7 +818,7 @@ new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
|
|||
m_obj->data = mmap(NULL, map_size,
|
||||
prot, flags,
|
||||
fd, 0);
|
||||
if (m_obj->data == (void *)-1)
|
||||
if (m_obj->data == (char *)-1)
|
||||
{
|
||||
Py_DECREF(m_obj);
|
||||
PyErr_SetFromErrno(mmap_module_error);
|
||||
|
|
|
@ -671,12 +671,10 @@ PyObject *PyUnicode_DecodeUTF8(const char *s,
|
|||
case 0:
|
||||
errmsg = "unexpected code byte";
|
||||
goto utf8Error;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
errmsg = "internal error";
|
||||
goto utf8Error;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if ((s[1] & 0xc0) != 0x80) {
|
||||
|
@ -740,7 +738,6 @@ PyObject *PyUnicode_DecodeUTF8(const char *s,
|
|||
/* Other sizes are only needed for UCS-4 */
|
||||
errmsg = "unsupported Unicode code range";
|
||||
goto utf8Error;
|
||||
break;
|
||||
}
|
||||
s += n;
|
||||
continue;
|
||||
|
|
|
@ -445,7 +445,6 @@ PyToken_ThreeChars(int c1, int c2, int c3)
|
|||
switch (c3) {
|
||||
case '=':
|
||||
return LEFTSHIFTEQUAL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -456,7 +455,6 @@ PyToken_ThreeChars(int c1, int c2, int c3)
|
|||
switch (c3) {
|
||||
case '=':
|
||||
return RIGHTSHIFTEQUAL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -467,7 +465,6 @@ PyToken_ThreeChars(int c1, int c2, int c3)
|
|||
switch (c3) {
|
||||
case '=':
|
||||
return DOUBLESTAREQUAL;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2146,7 +2146,6 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals,
|
|||
opcode = NEXTOP();
|
||||
oparg = oparg<<16 | NEXTARG();
|
||||
goto dispatch_opcode;
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr,
|
||||
|
|
Loading…
Reference in New Issue