-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
I am currently getting the following compiler warnings on main
Objects/longobject.c: In function ‘long_format_binary’:
Objects/longobject.c:2120:13: warning: ‘kind’ may be used uninitialized [-Wmaybe-uninitialized]
2120 | else if (kind == PyUnicode_1BYTE_KIND) {
| ^
Objects/longobject.c:1996:9: note: ‘kind’ was declared here
1996 | int kind;
| ^~~~
Objects/longobject.c: In function ‘long_to_decimal_string_internal’:
Objects/longobject.c:1943:13: warning: ‘kind’ may be used uninitialized [-Wmaybe-uninitialized]
1943 | else if (kind == PyUnicode_1BYTE_KIND) {
| ^
Objects/longobject.c:1767:9: note: ‘kind’ was declared here
1767 | int kind;
| ^~~~
$ gcc --version
gcc (GCC) 13.2.1 20230801
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
- GH-110819: fix maybe-uninitialized warnings on longobject.c #110821
- gh-110819: Fix ‘kind’ may be used uninitialized warning in
longobject
#116599 - [3.12] gh-110819: Fix ‘kind’ may be used uninitialized warning in
longobject
(GH-116599) #116648 - [3.11] gh-110819: Fix ‘kind’ may be used uninitialized warning in
longobject
(GH-116599) #116650
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error