diff options
author | Brett Cannon <bcannon@gmail.com> | 2011-02-22 20:15:44 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2011-02-22 20:15:44 (GMT) |
commit | b94767ff44edf5d461d7cb1c8eb5160f83886358 (patch) | |
tree | b43b482e765b0383b3326779f6815e72b2bacccb /Modules/_json.c | |
parent | 79da6b7075a3d51ae042e77a2afca827e7bce435 (diff) | |
download | cpython-b94767ff44edf5d461d7cb1c8eb5160f83886358.zip cpython-b94767ff44edf5d461d7cb1c8eb5160f83886358.tar.gz cpython-b94767ff44edf5d461d7cb1c8eb5160f83886358.tar.bz2 |
Issue #8914: fix various warnings from the Clang static analyzer v254.
Diffstat (limited to 'Modules/_json.c')
-rw-r--r-- | Modules/_json.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 75b14ee..6c1a194 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); |