summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-04-21 02:46:11 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-04-21 02:46:11 (GMT)
commitcf96de052f656c400ecfd8302d6507e4f586c365 (patch)
tree23d807a64949fa6c8035917a4e74b58b760b0709
parent9dfe4cdfa46caa3087c6c383ffa307437f4536b4 (diff)
downloadcpython-cf96de052f656c400ecfd8302d6507e4f586c365.zip
cpython-cf96de052f656c400ecfd8302d6507e4f586c365.tar.gz
cpython-cf96de052f656c400ecfd8302d6507e4f586c365.tar.bz2
SF but #417587: compiler warnings compiling 2.1.
Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
-rw-r--r--Modules/mmapmodule.c2
-rw-r--r--Objects/unicodeobject.c3
-rw-r--r--Parser/tokenizer.c3
-rw-r--r--Python/ceval.c1
4 files changed, 1 insertions, 8 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index c1cc013..c48278f 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -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);
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index f3cab05..b3c8ba4 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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;
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 6ae5084..b783e80 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -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;
}
diff --git a/Python/ceval.c b/Python/ceval.c
index 4f4a646..d76c6f2 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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,