]> granicus.if.org Git - python/commitdiff
Tweak previous patch to silence a warning about the unused left value in the
authorBrett Cannon <bcannon@gmail.com>
Tue, 3 Aug 2004 04:53:29 +0000 (04:53 +0000)
committerBrett Cannon <bcannon@gmail.com>
Tue, 3 Aug 2004 04:53:29 +0000 (04:53 +0000)
comma expression in listpop() that was being returned.  Still essentially
unused (as it is meant to be), but now the compiler thinks it is worth
*something* by having it incremented.

Objects/listobject.c

index 72b235629c6e9e580e8e7d211ba680718e7d2b3d..c95d530bcd429bbbfa261dde9b863fc8145f4eb1 100644 (file)
@@ -862,7 +862,7 @@ listpop(PyListObject *self, PyObject *args)
        /* Use status, so that in a release build compilers don't
         * complain about the unused name.
         */
-       return status, v;
+       return status++, v;
 }
 
 /* Reverse a slice of a list in place, from lo up to (exclusive) hi. */