diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2023-05-15 13:36:35 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 13:36:35 -0600 |
commit | 921a97e6bd43beaa5495ff08c5794e373e2cdaad (patch) | |
tree | e19e61fe4c3375ab3babb9cf8bce4a8a92b60086 | |
parent | 9bc9ed75fd6ef0127a5027d8b65cfc18052e60e9 (diff) | |
parent | 7a6a867cfb785eca60c6ee0cbd7d7816ece510bd (diff) | |
download | numpy-921a97e6bd43beaa5495ff08c5794e373e2cdaad.tar.gz |
Merge pull request #23765 from ngoldbaum/fix-compiler-warnings
MAINT: fix signed/unsigned int comparison warnings
-rw-r--r-- | numpy/core/src/multiarray/convert.c | 2 | ||||
-rw-r--r-- | numpy/core/src/umath/loops_trigonometric.dispatch.c.src | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c index 7ef80cf28..d1f6e66af 100644 --- a/numpy/core/src/multiarray/convert.c +++ b/numpy/core/src/multiarray/convert.c @@ -393,7 +393,7 @@ PyArray_FillWithScalar(PyArrayObject *arr, PyObject *obj) char *value = (char *)value_buffer_stack; PyArray_Descr *descr = PyArray_DESCR(arr); - if (descr->elsize > sizeof(value_buffer_stack)) { + if ((size_t)descr->elsize > sizeof(value_buffer_stack)) { /* We need a large temporary buffer... */ value_buffer_heap = PyObject_Calloc(1, descr->elsize); if (value_buffer_heap == NULL) { diff --git a/numpy/core/src/umath/loops_trigonometric.dispatch.c.src b/numpy/core/src/umath/loops_trigonometric.dispatch.c.src index 43eb58ffe..1b77592c8 100644 --- a/numpy/core/src/umath/loops_trigonometric.dispatch.c.src +++ b/numpy/core/src/umath/loops_trigonometric.dispatch.c.src @@ -354,7 +354,7 @@ simd_sincos_f32(const float *src, npy_intp ssrc, float *dst, npy_intp sdst, npyv_storen_till_f32(dst, sdst, len, cos); } } - if (simd_maski != ((1 << vstep) - 1)) { + if (simd_maski != (npy_uint64)((1 << vstep) - 1)) { float NPY_DECL_ALIGNED(NPY_SIMD_WIDTH) ip_fback[npyv_nlanes_f32]; npyv_storea_f32(ip_fback, x_in); |