mirror of
https://github.com/python/cpython.git
synced 2025-11-26 13:22:51 +00:00
Issue #22207: Fix "comparison between signed and unsigned integers" warning in
test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.
This commit is contained in:
parent
daca3d7e9b
commit
049e509a9f
8 changed files with 21 additions and 19 deletions
|
|
@ -42,7 +42,7 @@ fcntl_fcntl(PyObject *self, PyObject *args)
|
|||
|
||||
if (PyArg_ParseTuple(args, "O&is#:fcntl",
|
||||
conv_descriptor, &fd, &code, &str, &len)) {
|
||||
if (len > sizeof buf) {
|
||||
if ((size_t)len > sizeof buf) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"fcntl string arg too long");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue