mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
Issue #22156: Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
This commit is contained in:
parent
eae94706a3
commit
98ea54c35c
5 changed files with 6 additions and 6 deletions
|
@ -872,7 +872,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
|||
STORE_SIZE(count);
|
||||
format++;
|
||||
} else {
|
||||
if (strlen(*p) != count)
|
||||
if (strlen(*p) != (size_t)count)
|
||||
return converterr(
|
||||
"bytes without null bytes",
|
||||
arg, msgbuf, bufsize);
|
||||
|
@ -994,7 +994,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
|||
*p = PyUnicode_AsUnicodeAndSize(arg, &len);
|
||||
if (*p == NULL)
|
||||
RETURN_ERR_OCCURRED;
|
||||
if (Py_UNICODE_strlen(*p) != len)
|
||||
if (Py_UNICODE_strlen(*p) != (size_t)len)
|
||||
return converterr(
|
||||
"str without null characters or None",
|
||||
arg, msgbuf, bufsize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue