Issue #8914: fix various warnings from the Clang static analyzer v254.

This commit is contained in:
Brett Cannon 2011-02-22 20:15:44 +00:00
parent 79da6b7075
commit b94767ff44
36 changed files with 69 additions and 84 deletions

View file

@ -5418,7 +5418,6 @@ PyUnicode_BuildEncodingMap(PyObject* string)
if (!result)
return NULL;
for (i = 0; i < 256; i++) {
key = value = NULL;
key = PyLong_FromLong(decode[i]);
value = PyLong_FromLong(i);
if (!key || !value)
@ -6935,7 +6934,7 @@ PyObject *replace(PyUnicodeObject *self,
}
} else {
Py_ssize_t n, i, j, e;
Py_ssize_t n, i, j;
Py_ssize_t product, new_size, delta;
Py_UNICODE *p;
@ -6967,7 +6966,6 @@ PyObject *replace(PyUnicodeObject *self,
return NULL;
i = 0;
p = u->str;
e = self->length - str1->length;
if (str1->length > 0) {
while (n-- > 0) {
/* look for next match */