SF but #417587: compiler warnings compiling 2.1.

Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
This commit is contained in:
Tim Peters 2001-04-21 02:46:11 +00:00
parent 9dfe4cdfa4
commit cf96de052f
4 changed files with 1 additions and 8 deletions

View File

@ -818,7 +818,7 @@ new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
m_obj->data = mmap(NULL, map_size, m_obj->data = mmap(NULL, map_size,
prot, flags, prot, flags,
fd, 0); fd, 0);
if (m_obj->data == (void *)-1) if (m_obj->data == (char *)-1)
{ {
Py_DECREF(m_obj); Py_DECREF(m_obj);
PyErr_SetFromErrno(mmap_module_error); PyErr_SetFromErrno(mmap_module_error);

View File

@ -671,12 +671,10 @@ PyObject *PyUnicode_DecodeUTF8(const char *s,
case 0: case 0:
errmsg = "unexpected code byte"; errmsg = "unexpected code byte";
goto utf8Error; goto utf8Error;
break;
case 1: case 1:
errmsg = "internal error"; errmsg = "internal error";
goto utf8Error; goto utf8Error;
break;
case 2: case 2:
if ((s[1] & 0xc0) != 0x80) { if ((s[1] & 0xc0) != 0x80) {
@ -740,7 +738,6 @@ PyObject *PyUnicode_DecodeUTF8(const char *s,
/* Other sizes are only needed for UCS-4 */ /* Other sizes are only needed for UCS-4 */
errmsg = "unsupported Unicode code range"; errmsg = "unsupported Unicode code range";
goto utf8Error; goto utf8Error;
break;
} }
s += n; s += n;
continue; continue;

View File

@ -445,7 +445,6 @@ PyToken_ThreeChars(int c1, int c2, int c3)
switch (c3) { switch (c3) {
case '=': case '=':
return LEFTSHIFTEQUAL; return LEFTSHIFTEQUAL;
break;
} }
break; break;
} }
@ -456,7 +455,6 @@ PyToken_ThreeChars(int c1, int c2, int c3)
switch (c3) { switch (c3) {
case '=': case '=':
return RIGHTSHIFTEQUAL; return RIGHTSHIFTEQUAL;
break;
} }
break; break;
} }
@ -467,7 +465,6 @@ PyToken_ThreeChars(int c1, int c2, int c3)
switch (c3) { switch (c3) {
case '=': case '=':
return DOUBLESTAREQUAL; return DOUBLESTAREQUAL;
break;
} }
break; break;
} }

View File

@ -2146,7 +2146,6 @@ eval_code2(PyCodeObject *co, PyObject *globals, PyObject *locals,
opcode = NEXTOP(); opcode = NEXTOP();
oparg = oparg<<16 | NEXTARG(); oparg = oparg<<16 | NEXTARG();
goto dispatch_opcode; goto dispatch_opcode;
break;
default: default:
fprintf(stderr, fprintf(stderr,