chiark / gitweb /
array.c: Add fake initializations in `pop' and `shift' to muffle warnings.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 27 Jul 2017 09:37:26 +0000 (10:37 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 16 Aug 2017 03:25:33 +0000 (04:25 +0100)
array.c

diff --git a/array.c b/array.c
index 5ef0d4b..724f16b 100644 (file)
--- a/array.c
+++ b/array.c
@@ -518,7 +518,7 @@ static PyObject *dameth_push(PyObject *me, PyObject *arg)
 
 static PyObject *dameth_pop(PyObject *me, PyObject *arg)
 {
-  PyObject *x;
+  PyObject *x = Py_None;
 
   if (!PyArg_ParseTuple(arg, ":pop")) return (0);
   TRY
@@ -545,7 +545,7 @@ static PyObject *dameth_unshift(PyObject *me, PyObject *arg)
 
 static PyObject *dameth_shift(PyObject *me, PyObject *arg)
 {
-  PyObject *x;
+  PyObject *x = Py_None;
 
   if (!PyArg_ParseTuple(arg, ":shift")) return (0);
   TRY