summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-09-16 07:09:07 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-09-16 07:09:07 +0000
commit30a0e8e344f8a53870df423338188df22f234605 (patch)
treeab5bd047a0ed4204bb03eb17d33fce57ee7547b6 /numpy
parent4118f141f6797dc64df7ada25f76a83975a541f8 (diff)
downloadnumpy-30a0e8e344f8a53870df423338188df22f234605.tar.gz
ENH: fix a few unused/missing initialized warnings.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/arrayobject.c3
-rw-r--r--numpy/core/src/multiarray/arraytypes.c.src2
-rw-r--r--numpy/core/src/multiarray/buffer.c4
-rw-r--r--numpy/core/src/multiarray/descriptor.c3
-rw-r--r--numpy/core/src/multiarray/flagsobject.c3
-rw-r--r--numpy/core/src/multiarray/iterators.c9
-rw-r--r--numpy/core/src/multiarray/mapping.c3
-rw-r--r--numpy/core/src/multiarray/scalartypes.c.src26
-rw-r--r--numpy/core/src/umath/ufunc_object.c5
-rw-r--r--numpy/core/src/umath/umath_tests.c.src8
10 files changed, 61 insertions, 5 deletions
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c
index 2f49e03a5..1a45ad78e 100644
--- a/numpy/core/src/multiarray/arrayobject.c
+++ b/numpy/core/src/multiarray/arrayobject.c
@@ -1326,6 +1326,9 @@ NPY_NO_EXPORT PyTypeObject PyArray_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src
index e54aac667..db69f74b2 100644
--- a/numpy/core/src/multiarray/arraytypes.c.src
+++ b/numpy/core/src/multiarray/arraytypes.c.src
@@ -3057,6 +3057,7 @@ static PyArray_Descr @from@_Descr = {
NULL,
NULL,
&_Py@NAME@_ArrFuncs,
+ NULL,
};
/**end repeat**/
@@ -3139,6 +3140,7 @@ NPY_NO_EXPORT PyArray_Descr @from@_Descr = {
NULL,
NULL,
&_Py@NAME@_ArrFuncs,
+ NULL,
};
/**end repeat**/
diff --git a/numpy/core/src/multiarray/buffer.c b/numpy/core/src/multiarray/buffer.c
index 899a68fd5..45eb7e118 100644
--- a/numpy/core/src/multiarray/buffer.c
+++ b/numpy/core/src/multiarray/buffer.c
@@ -75,6 +75,10 @@ NPY_NO_EXPORT PyBufferProcs array_as_buffer = {
(writebufferproc)array_getwritebuf, /*bf_getwritebuffer*/
(segcountproc)array_getsegcount, /*bf_getsegcount*/
(charbufferproc)array_getcharbuf, /*bf_getcharbuffer*/
+#if PY_VERSION_HEX >= 0x02060000
+ (getbufferproc)0,
+ (releasebufferproc)0,
+#endif
#else
(getreadbufferproc)array_getreadbuf, /*bf_getreadbuffer*/
(getwritebufferproc)array_getwritebuf, /*bf_getwritebuffer*/
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c
index edcab8b09..66175f884 100644
--- a/numpy/core/src/multiarray/descriptor.c
+++ b/numpy/core/src/multiarray/descriptor.c
@@ -2684,4 +2684,7 @@ NPY_NO_EXPORT PyTypeObject PyArrayDescr_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
diff --git a/numpy/core/src/multiarray/flagsobject.c b/numpy/core/src/multiarray/flagsobject.c
index 38121f910..8d9ef6178 100644
--- a/numpy/core/src/multiarray/flagsobject.c
+++ b/numpy/core/src/multiarray/flagsobject.c
@@ -609,4 +609,7 @@ NPY_NO_EXPORT PyTypeObject PyArrayFlags_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
diff --git a/numpy/core/src/multiarray/iterators.c b/numpy/core/src/multiarray/iterators.c
index fd2b62c5c..6757b2a8a 100644
--- a/numpy/core/src/multiarray/iterators.c
+++ b/numpy/core/src/multiarray/iterators.c
@@ -1293,6 +1293,9 @@ NPY_NO_EXPORT PyTypeObject PyArrayIter_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
/** END of Array Iterator **/
@@ -1755,6 +1758,9 @@ NPY_NO_EXPORT PyTypeObject PyArrayMultiIter_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
/*========================= Neighborhood iterator ======================*/
@@ -2084,4 +2090,7 @@ NPY_NO_EXPORT PyTypeObject PyArrayNeighborhoodIter_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c
index 389adf02f..d8861f326 100644
--- a/numpy/core/src/multiarray/mapping.c
+++ b/numpy/core/src/multiarray/mapping.c
@@ -1668,6 +1668,9 @@ NPY_NO_EXPORT PyTypeObject PyArrayMapIter_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
/** END of Subscript Iterator **/
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
index e50106866..22726bd18 100644
--- a/numpy/core/src/multiarray/scalartypes.c.src
+++ b/numpy/core/src/multiarray/scalartypes.c.src
@@ -93,6 +93,9 @@ NPY_NO_EXPORT PyTypeObject Py@NAME@ArrType_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
/**end repeat**/
@@ -1797,6 +1800,10 @@ static PyBufferProcs gentype_as_buffer = {
NULL, /* bf_getwritebuffer*/
gentype_getsegcount, /* bf_getsegcount*/
gentype_getcharbuf, /* bf_getcharbuffer*/
+#if PY_VERSION_HEX >= 0x02060000
+ NULL,
+ NULL,
+#endif
};
@@ -1860,6 +1867,9 @@ NPY_NO_EXPORT PyTypeObject PyGenericArrType_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
static void
@@ -2593,6 +2603,10 @@ static PyBufferProcs object_arrtype_as_buffer = {
(writebufferproc)object_arrtype_getwritebuf,
(segcountproc)object_arrtype_getsegcount,
(charbufferproc)object_arrtype_getcharbuf,
+#if PY_VERSION_HEX >= 0x02060000
+ (getbufferproc)0,
+ (releasebufferproc)0,
+#endif
#else
(getreadbufferproc)object_arrtype_getreadbuf,
(getwritebufferproc)object_arrtype_getwritebuf,
@@ -2663,6 +2677,9 @@ NPY_NO_EXPORT PyTypeObject PyObjectArrType_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
static PyObject *
@@ -2767,6 +2784,9 @@ NPY_NO_EXPORT PyTypeObject Py@NAME@ArrType_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
/**end repeat**/
@@ -2850,6 +2870,9 @@ NPY_NO_EXPORT PyTypeObject Py@NAME@ArrType_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
#undef _THIS_SIZE
@@ -2949,6 +2972,9 @@ NPY_NO_EXPORT PyTypeObject Py@NAME@ArrType_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
#undef _THIS_SIZE1
#undef _THIS_SIZE2
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index 22f9f2f7f..54668cb71 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -4314,7 +4314,7 @@ static PyGetSetDef ufunc_getset[] = {
NULL, "identity value", NULL},
{"signature",
(getter)ufunc_get_signature,
- NULL, "signature"},
+ NULL, "signature", NULL},
{NULL, NULL, NULL, NULL, NULL}, /* Sentinel */
};
@@ -4380,6 +4380,9 @@ NPY_NO_EXPORT PyTypeObject PyUFunc_Type = {
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ 0, /* tp_version_tag */
+#endif
};
/* End of code for ufunc objects */
diff --git a/numpy/core/src/umath/umath_tests.c.src b/numpy/core/src/umath/umath_tests.c.src
index 3c47613d6..e430d13a1 100644
--- a/numpy/core/src/umath/umath_tests.c.src
+++ b/numpy/core/src/umath/umath_tests.c.src
@@ -64,7 +64,7 @@ char *inner1d_signature = "(i),(i)->()";
* out[n] = sum_i { in1[n, i] * in2[n, i] }.
*/
static void
-@TYPE@_inner1d(char **args, intp *dimensions, intp *steps, void *func)
+@TYPE@_inner1d(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func))
{
INIT_OUTER_LOOP_3
intp di = dimensions[0];
@@ -99,7 +99,7 @@ char *innerwt_signature = "(i),(i),(i)->()";
*/
static void
-@TYPE@_innerwt(char **args, intp *dimensions, intp *steps, void *func)
+@TYPE@_innerwt(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func))
{
INIT_OUTER_LOOP_4
intp di = dimensions[0];
@@ -135,7 +135,7 @@ char *matrix_multiply_signature = "(m,n),(n,p)->(m,p)";
static void
-@TYPE@_matrix_multiply(char **args, intp *dimensions, intp *steps, void *func)
+@TYPE@_matrix_multiply(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func))
{
/* no BLAS is available */
INIT_OUTER_LOOP_3
@@ -241,7 +241,7 @@ addUfuncs(PyObject *dictionary) {
static PyObject *
-UMath_Tests_test_signature(PyObject *dummy, PyObject *args)
+UMath_Tests_test_signature(PyObject *NPY_UNUSED(dummy), PyObject *args)
{
int nin, nout;
PyObject *signature;