Skip to content

[3.9] bpo-40686: Fix compiler warnings on _zoneinfo.c (GH-23614) #23804

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

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Dec 16, 2020

"uint8_t day" is unsigned and so "day < 0" test is always true.
Remove the test to fix the following warnings on Windows:

modules_zoneinfo.c(1224): warning C4068: unknown pragma
modules_zoneinfo.c(1225): warning C4068: unknown pragma
modules_zoneinfo.c(1227): warning C4068: unknown pragma
(cherry picked from commit aefb69b)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue40686

"uint8_t day" is unsigned and so "day < 0" test is always true.
Remove the test to fix the following warnings on Windows:

modules\_zoneinfo.c(1224): warning C4068: unknown pragma
modules\_zoneinfo.c(1225): warning C4068: unknown pragma
modules\_zoneinfo.c(1227): warning C4068: unknown pragma
(cherry picked from commit aefb69b)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington
Copy link
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

Copy link
Member

@pganssle pganssle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrongly merged in the first place.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@miss-islington
Copy link
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@vstinner
Copy link
Member

This is a backport of a change which has been approved. This backport is not the right place to continue the discussion.

Since you created https://bugs.python.org/issue42660, I suggest to continue the discussion there.

As I wrote in the parent PR, there is room for enhancement, but this change is a practical fix for https://bugs.python.org/issue40686

@vstinner vstinner merged commit 7492b55 into python:3.9 Dec 16, 2020
@miss-islington miss-islington deleted the backport-aefb69b-3.9 branch December 16, 2020 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants