[Python-checkins] r80746 - python/trunk/Objects/unicodeobject.c

brett.cannon python-checkins at python.org
Tue May 4 03:16:51 CEST 2010


Author: brett.cannon
Date: Tue May  4 03:16:51 2010
New Revision: 80746

Log:
Remove an unneeded variable and assignment.

Found using Clang's static analyzer.


Modified:
   python/trunk/Objects/unicodeobject.c

Modified: python/trunk/Objects/unicodeobject.c
==============================================================================
--- python/trunk/Objects/unicodeobject.c	(original)
+++ python/trunk/Objects/unicodeobject.c	Tue May  4 03:16:51 2010
@@ -4346,7 +4346,7 @@
         if (!result)
             return NULL;
         for (i = 0; i < 256; i++) {
-            key = value = NULL;
+            value = NULL;
             key = PyInt_FromLong(decode[i]);
             value = PyInt_FromLong(i);
             if (!key || !value)
@@ -5846,7 +5846,7 @@
         }
     } else {
 
-        Py_ssize_t n, i, j, e;
+        Py_ssize_t n, i, j;
         Py_ssize_t product, new_size, delta;
         Py_UNICODE *p;
 
@@ -5878,7 +5878,6 @@
             return NULL;
         i = 0;
         p = u->str;
-        e = self->length - str1->length;
         if (str1->length > 0) {
             while (n-- > 0) {
                 /* look for next match */


More information about the Python-checkins mailing list