From cf96de052f656c400ecfd8302d6507e4f586c365 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sat, 21 Apr 2001 02:46:11 +0000 Subject: [PATCH] SF but #417587: compiler warnings compiling 2.1. Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported. --- Modules/mmapmodule.c | 2 +- Objects/unicodeobject.c | 3 --- Parser/tokenizer.c | 3 --- Python/ceval.c | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index c1cc013ed29..c48278f6c55 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 f3cab05e387..b3c8ba4790f 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 6ae5084c11f..b783e807844 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 4f4a6461493..d76c6f2766d 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,