This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: New compiler warnings with latest zlib
Type: compile error Stage: resolved
Components: Build, Windows Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jkloth, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2022-04-05 17:45 by jkloth, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 32337 merged jkloth, 2022-04-05 17:47
PR 32346 merged jkloth, 2022-04-05 22:19
PR 32347 merged jkloth, 2022-04-05 22:19
Messages (6)
msg416792 - (view) Author: Jeremy Kloth (jkloth) * Date: 2022-04-05 17:45
The latest zlib (1.2.12) introduces 3 new compiler warnings.  Now being an external library, I do not think we generally patch them, so I propose to simply silence the warnings for the offending file.

For reference, the problem comes from:

--- deflate.h.old       2022-04-05 11:27:26.869042900 -0600
+++ deflate.h.new       2022-04-05 11:26:11.512039600 -0600
@@ -329,8 +329,8 @@
 # define _tr_tally_dist(s, distance, length, flush) \
   { uch len = (uch)(length); \
     ush dist = (ush)(distance); \
-    s->sym_buf[s->sym_next++] = dist; \
-    s->sym_buf[s->sym_next++] = dist >> 8; \
+    s->sym_buf[s->sym_next++] = (uch)dist; \
+    s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
     s->sym_buf[s->sym_next++] = len; \
     dist--; \
     s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
msg416802 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-05 19:03
Do we need to backport this?
msg416803 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-05 19:03
New changeset 944f09adfcc59f54432ac2947cf95f3465d90e1e by Jeremy Kloth in branch 'main':
bpo-47230: Silence compiler warnings on Windows from zlib 1.2.12 (GH-32337)
https://github.com/python/cpython/commit/944f09adfcc59f54432ac2947cf95f3465d90e1e
msg416809 - (view) Author: Jeremy Kloth (jkloth) * Date: 2022-04-05 19:44
It seems so, as the zlib update was also backported to 3.9 and 3.10.
msg416834 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-05 23:36
New changeset 8bce3cb16df5b8ac06ac6b2cae177dd221780b2f by Jeremy Kloth in branch '3.10':
bpo-47230: Silence compiler warnings on Windows from zlib 1.2.12 (GH-32337)
https://github.com/python/cpython/commit/8bce3cb16df5b8ac06ac6b2cae177dd221780b2f
msg416835 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-04-05 23:37
New changeset a4c7752f3e00b75fd1e4603458b8c77a9fa3d4cb by Jeremy Kloth in branch '3.9':
bpo-47230: Silence compiler warnings on Windows from zlib 1.2.12 (GH-32337)
https://github.com/python/cpython/commit/a4c7752f3e00b75fd1e4603458b8c77a9fa3d4cb
History
Date User Action Args
2022-04-11 14:59:58adminsetgithub: 91386
2022-04-06 00:03:19jklothsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-04-05 23:37:22steve.dowersetmessages: + msg416835
2022-04-05 23:36:31steve.dowersetmessages: + msg416834
2022-04-05 22:19:57jklothsetpull_requests: + pull_request30400
2022-04-05 22:19:01jklothsetpull_requests: + pull_request30399
2022-04-05 19:44:11jklothsetmessages: + msg416809
2022-04-05 19:03:40steve.dowersetmessages: + msg416803
2022-04-05 19:03:30steve.dowersetmessages: + msg416802
2022-04-05 17:47:25jklothsetkeywords: + patch
stage: patch review
pull_requests: + pull_request30393
2022-04-05 17:45:26jklothcreate