summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Buitinck <L.J.Buitinck@uva.nl>2013-08-27 12:05:22 +0200
committerLars Buitinck <L.J.Buitinck@uva.nl>2013-08-27 12:17:25 +0200
commit994bf25181ad33385dcd7f6615846f98f06e6f3e (patch)
treea9ea077b47894b517c359dfe7547a6059fa695f0
parent404a21a3140ddb942d4b38aea5aa50f58d4def44 (diff)
downloadnumpy-994bf25181ad33385dcd7f6615846f98f06e6f3e.tar.gz
FIX: remove unused variables and add casts
Makes the build complete with fewer warnings.
-rw-r--r--numpy/core/src/multiarray/multiarray_tests.c.src3
-rw-r--r--numpy/core/src/multiarray/nditer_api.c2
-rw-r--r--numpy/core/src/umath/ufunc_object.c6
-rw-r--r--numpy/numarray/_capi.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/numpy/core/src/multiarray/multiarray_tests.c.src b/numpy/core/src/multiarray/multiarray_tests.c.src
index 98b4dc2ba..9f327b24e 100644
--- a/numpy/core/src/multiarray/multiarray_tests.c.src
+++ b/numpy/core/src/multiarray/multiarray_tests.c.src
@@ -478,7 +478,8 @@ map_increment(PyArrayMapIterObject *mit, PyObject *op, inplace_map_binop add_inp
}
if ((it = (PyArrayIterObject *)\
- PyArray_BroadcastToShape(arr, mit->dimensions, mit->nd)) == NULL) {
+ PyArray_BroadcastToShape((PyObject *)arr, mit->dimensions,
+ mit->nd)) == NULL) {
Py_DECREF(arr);
return -1;
diff --git a/numpy/core/src/multiarray/nditer_api.c b/numpy/core/src/multiarray/nditer_api.c
index 40043648d..164a3a7a3 100644
--- a/numpy/core/src/multiarray/nditer_api.c
+++ b/numpy/core/src/multiarray/nditer_api.c
@@ -1837,7 +1837,7 @@ npyiter_copy_from_buffers(NpyIter *iter)
npy_intp *strides = NBF_STRIDES(bufferdata),
*ad_strides = NAD_STRIDES(axisdata);
npy_intp sizeof_axisdata = NIT_AXISDATA_SIZEOF(itflags, ndim, nop);
- char **ptrs = NBF_PTRS(bufferdata), **ad_ptrs = NAD_PTRS(axisdata);
+ char **ad_ptrs = NAD_PTRS(axisdata);
char **buffers = NBF_BUFFERS(bufferdata);
char *buffer;
diff --git a/numpy/core/src/umath/ufunc_object.c b/numpy/core/src/umath/ufunc_object.c
index bd501a6a4..cf4696269 100644
--- a/numpy/core/src/umath/ufunc_object.c
+++ b/numpy/core/src/umath/ufunc_object.c
@@ -755,7 +755,8 @@ static int get_ufunc_arguments(PyUFuncObject *ufunc,
obj = PyTuple_GET_ITEM(args, i);
if (PyArray_Check(obj)) {
- out_op[i] = (PyArrayObject *)PyArray_FromArray(obj,NULL,0);
+ PyArrayObject *obj_a = (PyArrayObject *)obj;
+ out_op[i] = (PyArrayObject *)PyArray_FromArray(obj_a, NULL, 0);
}
else {
if (!PyArray_IsScalar(obj, Generic)) {
@@ -4529,7 +4530,7 @@ PyUFunc_RegisterLoopForDescr(PyUFuncObject *ufunc,
result = -1;
}
else {
- PyUFunc_Loop1d *current, *prev = NULL;
+ PyUFunc_Loop1d *current;
int cmp = 1;
current = (PyUFunc_Loop1d *)NpyCapsule_AsVoidPtr(cobj);
while (current != NULL) {
@@ -4538,7 +4539,6 @@ PyUFunc_RegisterLoopForDescr(PyUFuncObject *ufunc,
if (cmp >= 0 && current->arg_dtypes == NULL) {
break;
}
- prev = current;
current = current->next;
}
if (cmp == 0 && current->arg_dtypes == NULL) {
diff --git a/numpy/numarray/_capi.c b/numpy/numarray/_capi.c
index 7320537a3..91e3b4984 100644
--- a/numpy/numarray/_capi.c
+++ b/numpy/numarray/_capi.c
@@ -1099,7 +1099,7 @@ NA_OutputArray(PyObject *a, NumarrayType t, int requires)
PyArray_DIMS((PyArrayObject *)a),
dtype, 0);
Py_INCREF(a);
- if (PyArray_SetUpdateIfCopyBase(ret, a) < 0) {
+ if (PyArray_SetUpdateIfCopyBase(ret, (PyArrayObject *)a) < 0) {
Py_DECREF(ret);
return NULL;
}