summaryrefslogtreecommitdiff
path: root/Modules/_json.c
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2011-02-22 20:15:44 +0000
committerBrett Cannon <bcannon@gmail.com>2011-02-22 20:15:44 +0000
commitffbf24bf0cc297d080d6d68bc809a9c156c49123 (patch)
tree784a982964a18755673f3d95a8d98eadb333671e /Modules/_json.c
parentd563a72e39fd9aa04119460ee7981b9f2287a19d (diff)
downloadcpython-ffbf24bf0cc297d080d6d68bc809a9c156c49123.tar.gz
Issue #8914: fix various warnings from the Clang static analyzer v254.
Diffstat (limited to 'Modules/_json.c')
-rw-r--r--Modules/_json.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/Modules/_json.c b/Modules/_json.c
index 75b14ee827..6c1a194f99 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -335,7 +335,7 @@ scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next
PyObject *rval = NULL;
Py_ssize_t len = PyUnicode_GET_SIZE(pystr);
Py_ssize_t begin = end - 1;
- Py_ssize_t next = begin;
+ Py_ssize_t next /* = begin */;
const Py_UNICODE *buf = PyUnicode_AS_UNICODE(pystr);
PyObject *chunks = NULL;
PyObject *chunk = NULL;
@@ -1532,13 +1532,12 @@ encoder_listencode_dict(PyEncoderObject *s, PyObject *rval, PyObject *dct, Py_ss
goto bail;
Py_CLEAR(ident);
}
+ /* TODO DOES NOT RUN; dead code
if (s->indent != Py_None) {
- /* TODO: DOES NOT RUN */
indent_level -= 1;
- /*
- yield '\n' + (' ' * (_indent * _current_indent_level))
- */
- }
+
+ yield '\n' + (' ' * (_indent * _current_indent_level))
+ }*/
if (PyList_Append(rval, close_dict))
goto bail;
return 0;
@@ -1624,13 +1623,13 @@ encoder_listencode_list(PyEncoderObject *s, PyObject *rval, PyObject *seq, Py_ss
goto bail;
Py_CLEAR(ident);
}
+
+ /* TODO: DOES NOT RUN
if (s->indent != Py_None) {
- /* TODO: DOES NOT RUN */
indent_level -= 1;
- /*
- yield '\n' + (' ' * (_indent * _current_indent_level))
- */
- }
+
+ yield '\n' + (' ' * (_indent * _current_indent_level))
+ }*/
if (PyList_Append(rval, close_array))
goto bail;
Py_DECREF(s_fast);