Merge pull request #5127 from radarhere/warnings

Fixed warnings assigning to "unsigned char *" from "char *"
This commit is contained in:
Hugo van Kemenade 2020-12-24 10:50:24 +02:00 committed by GitHub
commit 2635a4859d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1084,7 +1084,7 @@ font_render(FontObject* self, PyObject* args)
if (color) { if (color) {
/* target[RGB] returns the color, target[A] returns the mask */ /* target[RGB] returns the color, target[A] returns the mask */
/* target bands get split again in ImageDraw.text */ /* target bands get split again in ImageDraw.text */
target = im->image[yy] + xx * 4; target = (unsigned char*)im->image[yy] + xx * 4;
} else { } else {
target = im->image8[yy] + xx; target = im->image8[yy] + xx;
} }

View File

@ -198,7 +198,7 @@ ImagingGetExtrema(Imaging im, void *extrema)
imin = imax = v; imin = imax = v;
for (y = 0; y < im->ysize; y++) { for (y = 0; y < im->ysize; y++) {
for (x = 0; x < im->xsize; x++) { 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 #ifdef WORDS_BIGENDIAN
v = pixel[0] + (pixel[1] << 8); v = pixel[0] + (pixel[1] << 8);
#else #else