Skip to content

Commit 96e95f6

Browse files
Added casts to address compilation warnings
1 parent 65c1d3b commit 96e95f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

numba_dpex/core/runtime/_dpexrt_python.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static int DPEXRT_sycl_usm_ndarray_from_python(PyObject *obj,
842842
}
843843

844844
if (!(arystruct->meminfo = NRT_MemInfo_new_from_usmndarray(
845-
arrayobj, data, nitems, itemsize, qref)))
845+
(PyObject *)arrayobj, data, nitems, itemsize, qref)))
846846
{
847847
DPEXRT_DEBUG(drt_debug_print(
848848
"DPEXRT-ERROR: NRT_MemInfo_new_from_usmndarray failed "
@@ -855,7 +855,7 @@ static int DPEXRT_sycl_usm_ndarray_from_python(PyObject *obj,
855855
arystruct->sycl_queue = qref;
856856
arystruct->nitems = nitems;
857857
arystruct->itemsize = itemsize;
858-
arystruct->parent = arrayobj;
858+
arystruct->parent = (PyObject *)arrayobj;
859859

860860
p = arystruct->shape_and_strides;
861861

@@ -907,7 +907,7 @@ static int DPEXRT_sycl_usm_ndarray_from_python(PyObject *obj,
907907
__FILE__, __LINE__));
908908
gstate = PyGILState_Ensure();
909909
// decref the python object
910-
Py_XDECREF(arrayobj);
910+
Py_XDECREF((PyObject *)arrayobj);
911911
// release the GIL
912912
PyGILState_Release(gstate);
913913

0 commit comments

Comments
 (0)