Skip to content

Commit

Permalink
Merge pull request #6818 from radarhere/uninitialized
Browse files Browse the repository at this point in the history
Initialize unsigned char variables
  • Loading branch information
mergify[bot] authored Dec 22, 2022
2 parents fff0760 + 318b658 commit f1f1779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libImaging/Quant.c
Original file line number Diff line number Diff line change
Expand Up @@ -1717,7 +1717,7 @@ ImagingQuantize(Imaging im, int colors, int mode, int kmeans) {

withAlpha = !strcmp(im->mode, "RGBA");
int transparency = 0;
unsigned char r, g, b;
unsigned char r = 0, g = 0, b = 0;
for (i = y = 0; y < im->ysize; y++) {
for (x = 0; x < im->xsize; x++, i++) {
p[i].v = im->image32[y][x];
Expand Down

0 comments on commit f1f1779

Please sign in to comment.