From 8eaf9e7cb7d8c8cc33941f6f07a568d3537b49bb Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 24 Dec 2020 10:47:06 +1100 Subject: [PATCH] Fixed warning assigning to "unsigned char *" from "char *" --- src/_imagingft.c | 2 +- src/libImaging/GetBBox.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_imagingft.c b/src/_imagingft.c index 62db561ea..183cfb23e 100644 --- a/src/_imagingft.c +++ b/src/_imagingft.c @@ -1084,7 +1084,7 @@ font_render(FontObject* self, PyObject* args) if (color) { /* target[RGB] returns the color, target[A] returns the mask */ /* target bands get split again in ImageDraw.text */ - target = im->image[yy] + xx * 4; + target = (unsigned char*)im->image[yy] + xx * 4; } else { target = im->image8[yy] + xx; } diff --git a/src/libImaging/GetBBox.c b/src/libImaging/GetBBox.c index 9a8ae1f32..8db78c2e2 100644 --- a/src/libImaging/GetBBox.c +++ b/src/libImaging/GetBBox.c @@ -198,7 +198,7 @@ ImagingGetExtrema(Imaging im, void *extrema) imin = imax = v; for (y = 0; y < im->ysize; y++) { for (x = 0; x < im->xsize; x++) { - pixel = im->image[y] + x * sizeof(v); + pixel = (UINT8*)im->image[y] + x * sizeof(v); #ifdef WORDS_BIGENDIAN v = pixel[0] + (pixel[1] << 8); #else