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: compile warning in unicodeobject.c
Type: compile error Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Document PyUnicode_IsIdentifier() function
View: 39500
Assigned To: Nosy List: shihai1991, vstinner
Priority: normal Keywords: patch

Created on 2020-02-16 07:51 by shihai1991, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18519 merged shihai1991, 2020-02-16 08:37
Messages (5)
msg362048 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-02-16 07:51
Objects/unicodeobject.c: In function ‘PyUnicode_IsIdentifier’:
./Include/cpython/unicodeobject.h:396:38: warning: ‘data’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             ((const Py_UCS4 *)(data))[(index)] \
                                      ^
Objects/unicodeobject.c:12211:11: note: ‘data’ was declared here
     void *data;
           ^
In file included from ./Include/unicodeobject.h:1026:0,
                 from ./Include/Python.h:97,
                 from Objects/unicodeobject.c:42:
./Include/cpython/unicodeobject.h:391:6: warning: ‘kind’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     ((Py_UCS4) \
      ^
Objects/unicodeobject.c:12210:9: note: ‘kind’ was declared here
     int kind;
         ^
msg362049 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-02-16 07:51
I will create PR later.
msg362055 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-02-16 08:39
I don't find a good idea so I just add init operation :(
msg362142 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-02-17 13:42
Yeah, I saw the warning, but it's a false alarm. Values are always initialized. Anyway. Thanks for fixing them ;-)
msg362147 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2020-02-17 13:55
you are welcome ;0
History
Date User Action Args
2022-04-11 14:59:26adminsetgithub: 83827
2020-02-17 13:55:13shihai1991setmessages: + msg362147
2020-02-17 13:42:15vstinnersetstatus: open -> closed

superseder: Document PyUnicode_IsIdentifier() function

nosy: + vstinner
messages: + msg362142
resolution: duplicate
stage: patch review -> resolved
2020-02-16 08:39:20shihai1991setmessages: + msg362055
2020-02-16 08:37:57shihai1991setkeywords: + patch
stage: patch review
pull_requests: + pull_request17896
2020-02-16 07:51:56shihai1991setmessages: + msg362049
2020-02-16 07:51:44shihai1991create