summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2016-09-08 13:11:50 +0100
committerMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2016-09-08 13:24:53 +0100
commitd1bb606012b069600ae60e37b7675122fdde29b8 (patch)
tree1d2e37349965c58e0f30b62749300435a098199c /numpy
parenta3db73a8b2f53b0602b1aadd31c48836c07b82dc (diff)
downloadnumpy-d1bb606012b069600ae60e37b7675122fdde29b8.tar.gz
BUG: fix uninitialized variable
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/methods.c2
-rw-r--r--numpy/core/src/multiarray/multiarraymodule.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c
index cb8fea213..0156df913 100644
--- a/numpy/core/src/multiarray/methods.c
+++ b/numpy/core/src/multiarray/methods.c
@@ -559,7 +559,7 @@ array_tofile(PyArrayObject *self, PyObject *args, PyObject *kwds)
FILE *fd;
char *sep = "";
char *format = "";
- npy_off_t orig_pos;
+ npy_off_t orig_pos = 0;
static char *kwlist[] = {"file", "sep", "format", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|ss", kwlist,
diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c
index 7c3c95b24..abed5ced1 100644
--- a/numpy/core/src/multiarray/multiarraymodule.c
+++ b/numpy/core/src/multiarray/multiarraymodule.c
@@ -2031,7 +2031,7 @@ array_fromfile(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *keywds)
static char *kwlist[] = {"file", "dtype", "count", "sep", NULL};
PyArray_Descr *type = NULL;
int own;
- npy_off_t orig_pos;
+ npy_off_t orig_pos = 0;
FILE *fp;
if (!PyArg_ParseTupleAndKeywords(args, keywds,