diff options
author | Brett Cannon <bcannon@gmail.com> | 2010-05-03 23:51:28 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2010-05-03 23:51:28 (GMT) |
commit | 8ffe7bbb72768290e34d2af6dc0ad9818b45ce7e (patch) | |
tree | 3167dfb9964c4b1f0ea62272e1a5657bf838b8d5 | |
parent | 5d947cb324d1909480d71896cb5a9c06a668d6b3 (diff) | |
download | cpython-8ffe7bbb72768290e34d2af6dc0ad9818b45ce7e.zip cpython-8ffe7bbb72768290e34d2af6dc0ad9818b45ce7e.tar.gz cpython-8ffe7bbb72768290e34d2af6dc0ad9818b45ce7e.tar.bz2 |
Remove unused variables and a variable initialization.
Found using Clang's static analyzer.
-rw-r--r-- | Modules/_sre.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index eda30c4..9315f10 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -1686,7 +1686,7 @@ getstring(PyObject* string, Py_ssize_t* p_length, int* p_charsize) if (PyUnicode_Check(string)) { /* unicode strings doesn't always support the buffer interface */ ptr = (void*) PyUnicode_AS_DATA(string); - bytes = PyUnicode_GET_DATA_SIZE(string); + /* bytes = PyUnicode_GET_DATA_SIZE(string); */ size = PyUnicode_GET_SIZE(string); charsize = sizeof(Py_UNICODE); @@ -2967,13 +2967,13 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups) <INFO> <1=skip> <2=flags> <3=min> <4=max>; If SRE_INFO_PREFIX or SRE_INFO_CHARSET is in the flags, more follows. */ - SRE_CODE flags, min, max, i; + SRE_CODE flags, i; SRE_CODE *newcode; GET_SKIP; newcode = code+skip-1; GET_ARG; flags = arg; - GET_ARG; min = arg; - GET_ARG; max = arg; + GET_ARG; /* min */ + GET_ARG; /* max */ /* Check that only valid flags are present */ if ((flags & ~(SRE_INFO_PREFIX | SRE_INFO_LITERAL | @@ -2989,9 +2989,9 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups) FAIL; /* Validate the prefix */ if (flags & SRE_INFO_PREFIX) { - SRE_CODE prefix_len, prefix_skip; + SRE_CODE prefix_len; GET_ARG; prefix_len = arg; - GET_ARG; prefix_skip = arg; + GET_ARG; /* prefix skip */ /* Here comes the prefix string */ if (code+prefix_len < code || code+prefix_len > newcode) FAIL; |