[Python-checkins] r80736 - python/trunk/Modules/_sre.c
brett.cannon
python-checkins at python.org
Tue May 4 01:51:29 CEST 2010
Author: brett.cannon
Date: Tue May 4 01:51:28 2010
New Revision: 80736
Log:
Remove unused variables and a variable initialization.
Found using Clang's static analyzer.
Modified:
python/trunk/Modules/_sre.c
Modified: python/trunk/Modules/_sre.c
==============================================================================
--- python/trunk/Modules/_sre.c (original)
+++ python/trunk/Modules/_sre.c Tue May 4 01:51:28 2010
@@ -1686,7 +1686,7 @@
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 @@
<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 @@
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;
More information about the Python-checkins
mailing list