Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
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
This looks like a false-positive, because subobj is always initialized in stringlib_parse_args_finds(function_name, args, &subobj, &start, &end):
cpython/Objects/bytes_methods.c
Lines 770 to 786 in 87be8d9
| staticPyObject* | |
| _Py_bytes_tailmatch(constchar*str, Py_ssize_tlen, | |
| constchar*function_name, PyObject*args, | |
| intdirection) | |
| { | |
| Py_ssize_tstart=0; | |
| Py_ssize_tend=PY_SSIZE_T_MAX; | |
| PyObject*subobj; | |
| intresult; | |
| if (!stringlib_parse_args_finds(function_name, args, &subobj, &start, &end)) | |
| returnNULL; | |
| if (PyTuple_Check(subobj)){ | |
| Py_ssize_ti; | |
| for (i=0; i<PyTuple_GET_SIZE(subobj); i++){ | |
| result=tailmatch(str, len, PyTuple_GET_ITEM(subobj, i), | |
| start, end, direction); |
Morever, it is used before in PyTuple_Check(subobj).
Any ideas on how to fix / silence it?
And why we get this warning only now? The code was not changed for 10 months.
Linked PRs
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
