Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize unsigned char variables #6818

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

radarhere
Copy link
Member

https://github.com/python-pillow/Pillow/actions/runs/3752682144/jobs/6375115871#step:7:141

src/libImaging/Quant.c: In function ‘ImagingQuantize’:
src/libImaging/Quant.c:1720:29: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1720 | unsigned char r, g, b;
| ^
src/libImaging/Quant.c:1720:26: warning: ‘g’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1720 | unsigned char r, g, b;
| ^
src/libImaging/Quant.c:1720:23: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1720 | unsigned char r, g, b;
| ^

@radarhere radarhere changed the title Initialize unsigned char variables Always initialize unsigned char variables Dec 22, 2022
@radarhere radarhere changed the title Always initialize unsigned char variables Initialize unsigned char variables Dec 22, 2022
@hugovk hugovk added the automerge Automatically merge PRs that are ready label Dec 22, 2022
@mergify mergify bot merged commit f1f1779 into python-pillow:main Dec 22, 2022
@radarhere radarhere deleted the uninitialized branch December 22, 2022 23:24
@radarhere
Copy link
Member Author

For the record - they were always initialized before use, just not in a way that the compiler could detect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PRs that are ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants