diff Python/bltinmodule.c @ 68102:e2f96bd29252

Issue #8914: fix various warnings from the Clang static analyzer v254.
author Brett Cannon <bcannon@gmail.com>
date Tue, 22 Feb 2011 20:15:44 +0000
parents 713c6b6ca5ce
children aba16a5683d3
line wrap: on
line diff
--- a/Python/bltinmodule.c	Tue Feb 22 19:24:33 2011 +0000
+++ b/Python/bltinmodule.c	Tue Feb 22 20:15:44 2011 +0000
@@ -37,7 +37,7 @@
 {
     PyObject *func, *name, *bases, *mkw, *meta, *prep, *ns, *cell;
     PyObject *cls = NULL;
-    Py_ssize_t nargs, nbases;
+    Py_ssize_t nargs;
 
     assert(args != NULL);
     if (!PyTuple_Check(args)) {
@@ -61,7 +61,6 @@
     bases = PyTuple_GetSlice(args, 2, nargs);
     if (bases == NULL)
         return NULL;
-    nbases = nargs - 2;
 
     if (kwds == NULL) {
         meta = NULL;
@@ -766,7 +765,6 @@
 {
     PyObject *v;
     PyObject *prog, *globals = Py_None, *locals = Py_None;
-    int plain = 0;
 
     if (!PyArg_UnpackTuple(args, "exec", 1, 3, &prog, &globals, &locals))
         return NULL;
@@ -775,7 +773,6 @@
         globals = PyEval_GetGlobals();
         if (locals == Py_None) {
             locals = PyEval_GetLocals();
-            plain = 1;
         }
         if (!globals || !locals) {
             PyErr_SetString(PyExc_SystemError,