Skip to content

Commit 62bef78

Browse files
committed
Merge pull request #4524 from tacaswell/cln_fixup_cntr_pointers
CLN: explicitly cast (void *) -> (char *)
2 parents ddf4a88 + e0da0b1 commit 62bef78

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/cntr.c

+9-3
Original file line numberDiff line numberDiff line change
@@ -1843,8 +1843,14 @@ Cntr_init(Cntr *self, PyObject *args, PyObject *kwds)
18431843
" must have the same dimensions.");
18441844
goto error;
18451845
}
1846-
if (mpa) mask = PyArray_DATA(mpa);
1847-
else mask = NULL;
1846+
if (mpa)
1847+
{
1848+
mask = (char *) PyArray_DATA(mpa);
1849+
}
1850+
else
1851+
{
1852+
mask = NULL;
1853+
}
18481854
if ( cntr_init(self->site, iMax, jMax, (double *)PyArray_DATA(xpa),
18491855
(double *)PyArray_DATA(ypa),
18501856
(double *)PyArray_DATA(zpa), mask))
@@ -1901,7 +1907,7 @@ Cntr_get_cdata(Cntr *self)
19011907
dims[1] = nj = self->site->jmax;
19021908

19031909
Cdata = (PyArrayObject *) PyArray_SimpleNew(2, dims, NPY_SHORT);
1904-
data = PyArray_DATA(Cdata);
1910+
data = (char *) PyArray_DATA(Cdata);
19051911
for (j=0; j<nj; j++)
19061912
for (i=0; i<ni; i++)
19071913
data[j + i*nj] = self->site->data[i + j*ni];

0 commit comments

Comments
 (0)