diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-10-16 20:02:02 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-10-17 00:29:38 +0200 |
commit | 0f7eea9af4593f4490ff95611066e43176b5f8c8 (patch) | |
tree | 568703a60b184d8d5b3bfc16527eabf5762a2063 | |
parent | e31729bb9c7abd08b1815100abab6ca63f71b8bf (diff) | |
download | numpy-0f7eea9af4593f4490ff95611066e43176b5f8c8.tar.gz |
MAINT: silence warning by casting to right type
-rw-r--r-- | numpy/core/src/multiarray/common.c | 2 | ||||
-rw-r--r-- | numpy/core/src/multiarray/item_selection.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/multiarray/common.c b/numpy/core/src/multiarray/common.c index 4e2d64be3..9a05133a1 100644 --- a/numpy/core/src/multiarray/common.c +++ b/numpy/core/src/multiarray/common.c @@ -706,7 +706,7 @@ _IsAligned(PyArrayObject *ap) aligned |= (npy_uintp)PyArray_STRIDES(ap)[i]; #endif /* not NPY_RELAXED_STRIDES_CHECKING */ } - return npy_is_aligned(aligned, alignment); + return npy_is_aligned((void *)aligned, alignment); } NPY_NO_EXPORT npy_bool diff --git a/numpy/core/src/multiarray/item_selection.c b/numpy/core/src/multiarray/item_selection.c index af6ee8828..72cbf9a22 100644 --- a/numpy/core/src/multiarray/item_selection.c +++ b/numpy/core/src/multiarray/item_selection.c @@ -2414,7 +2414,7 @@ count_nonzero_bytes_128(npy_uint64 * w) */ if (NPY_UNLIKELY(((w1 | w2) & 0xFEFEFEFEFEFEFEFEULL) != 0)) { /* reload from pointer to avoid a unnecessary stack spill with gcc */ - char * c = w; + char * c = (char *)w; npy_uintp i, count = 0; for (i = 0; i < 16; i++) { count += (c[i] != 0); @@ -2469,7 +2469,7 @@ count_boolean_trues(int ndim, char *data, npy_intp *ashape, npy_intp *astrides) if (npy_is_aligned(data, sizeof(npy_uint64))) { npy_uintp stride = 2 * sizeof(npy_uint64); for (; d < e - (shape[0] % stride); d += stride) { - count += count_nonzero_bytes_128(d); + count += count_nonzero_bytes_128((npy_uint64 *)d); } } for (; d < e; ++d) { |