From 7a6a867cfb785eca60c6ee0cbd7d7816ece510bd Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Mon, 15 May 2023 10:02:51 -0600 Subject: MAINT: fix signed/unsigned int comparison warnings --- numpy/core/src/multiarray/convert.c | 2 +- numpy/core/src/umath/loops_trigonometric.dispatch.c.src | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/src') 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); -- cgit v1.2.1