Skip to content

Commit

Permalink
Merge pull request #5127 from radarhere/warnings
Browse files Browse the repository at this point in the history
Fixed warnings assigning to "unsigned char *" from "char *"
  • Loading branch information
hugovk committed Dec 24, 2020
2 parents be30065 + 8eaf9e7 commit 2635a48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_imagingft.c
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/GetBBox.c
Expand Up @@ -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
Expand Down

0 comments on commit 2635a48

Please sign in to comment.