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: Dead assignment in idna_converter function
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: alex.henrie, iritkatriel
Priority: normal Keywords: patch

Created on 2021-03-02 02:29 by alex.henrie, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 24701 open alex.henrie, 2021-03-02 02:31
Messages (2)
msg387896 - (view) Author: Alex Henrie (alex.henrie) * Date: 2021-03-02 02:29
The idna_converter function in socketmodule.c currently initializes the variable len to -1, then reinitializes it on every path that uses it. The first initialization could be removed to simplify the code and clarify its intent.

Defect identified by scan-build <https://clang-analyzer.llvm.org/scan-build.html>
msg412109 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-29 23:51
I don't think removing this will make the code easier to read. It's an exercise to verify that all the different if-else branches set this variable.
History
Date User Action Args
2022-04-11 14:59:42adminsetgithub: 87527
2022-01-29 23:51:42iritkatrielsetnosy: + iritkatriel
messages: + msg412109
2021-03-02 02:31:03alex.henriesetkeywords: + patch
stage: patch review
pull_requests: + pull_request23478
2021-03-02 02:29:09alex.henriecreate