mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +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
|
@ -2439,7 +2439,7 @@ If the argument is omitted, strip trailing ASCII whitespace.");
|
|||
static PyObject *
|
||||
bytearray_rstrip(PyByteArrayObject *self, PyObject *args)
|
||||
{
|
||||
Py_ssize_t left, right, mysize, argsize;
|
||||
Py_ssize_t right, mysize, argsize;
|
||||
void *myptr, *argptr;
|
||||
PyObject *arg = Py_None;
|
||||
Py_buffer varg;
|
||||
|
@ -2457,11 +2457,10 @@ bytearray_rstrip(PyByteArrayObject *self, PyObject *args)
|
|||
}
|
||||
myptr = self->ob_bytes;
|
||||
mysize = Py_SIZE(self);
|
||||
left = 0;
|
||||
right = rstrip_helper(myptr, mysize, argptr, argsize);
|
||||
if (arg != Py_None)
|
||||
PyBuffer_Release(&varg);
|
||||
return PyByteArray_FromStringAndSize(self->ob_bytes + left, right - left);
|
||||
return PyByteArray_FromStringAndSize(self->ob_bytes, right);
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(decode_doc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue