[Python-checkins] r80734 - python/trunk/Modules/_json.c
brett.cannon
python-checkins at python.org
Tue May 4 01:43:49 CEST 2010
Author: brett.cannon
Date: Tue May 4 01:43:49 2010
New Revision: 80734
Log:
Remove unneeded variable mutation and initializations.
Found using Clang's static analyzer.
Modified:
python/trunk/Modules/_json.c
Modified: python/trunk/Modules/_json.c
==============================================================================
--- python/trunk/Modules/_json.c (original)
+++ python/trunk/Modules/_json.c Tue May 4 01:43:49 2010
@@ -439,7 +439,7 @@
PyObject *rval;
Py_ssize_t len = PyString_GET_SIZE(pystr);
Py_ssize_t begin = end - 1;
- Py_ssize_t next = begin;
+ Py_ssize_t next;
int has_unicode = 0;
char *buf = PyString_AS_STRING(pystr);
PyObject *chunks = PyList_New(0);
@@ -644,7 +644,7 @@
PyObject *rval;
Py_ssize_t len = PyUnicode_GET_SIZE(pystr);
Py_ssize_t begin = end - 1;
- Py_ssize_t next = begin;
+ Py_ssize_t next;
const Py_UNICODE *buf = PyUnicode_AS_UNICODE(pystr);
PyObject *chunks = PyList_New(0);
if (chunks == NULL) {
@@ -2178,8 +2178,9 @@
}
if (s->indent != Py_None) {
/* TODO: DOES NOT RUN */
- indent_level -= 1;
/*
+ indent_level -= 1;
+
yield '\n' + (' ' * (_indent * _current_indent_level))
*/
}
@@ -2268,8 +2269,9 @@
}
if (s->indent != Py_None) {
/* TODO: DOES NOT RUN */
- indent_level -= 1;
/*
+ indent_level -= 1;
+
yield '\n' + (' ' * (_indent * _current_indent_level))
*/
}
More information about the Python-checkins
mailing list