mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #8914: fix various warnings from the Clang static analyzer v254.
This commit is contained in:
parent
79da6b7075
commit
b94767ff44
36 changed files with 69 additions and 84 deletions
|
@ -966,9 +966,10 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
|||
case 'u': /* raw unicode buffer (Py_UNICODE *) */
|
||||
case 'Z': /* raw unicode buffer or None */
|
||||
{
|
||||
Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **);
|
||||
|
||||
if (*format == '#') { /* any buffer-like object */
|
||||
/* "s#" or "Z#" */
|
||||
Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **);
|
||||
FETCH_SIZE;
|
||||
|
||||
if (c == 'Z' && arg == Py_None) {
|
||||
|
@ -984,8 +985,6 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
|||
format++;
|
||||
} else {
|
||||
/* "s" or "Z" */
|
||||
Py_UNICODE **p = va_arg(*p_va, Py_UNICODE **);
|
||||
|
||||
if (c == 'Z' && arg == Py_None)
|
||||
*p = NULL;
|
||||
else if (PyUnicode_Check(arg)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue