summaryrefslogtreecommitdiffstats
path: root/Python/getargs.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-08-15 21:30:40 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-08-15 21:30:40 (GMT)
commit98ea54c35c37e4f9a7d7a923a7ccd792f4b7ff90 (patch)
tree126cb038a65e06368c70f900ed90139c0e67a66b /Python/getargs.c
parenteae94706a30c99150982034d644d8b3abf28110b (diff)
downloadcpython-98ea54c35c37e4f9a7d7a923a7ccd792f4b7ff90.zip
cpython-98ea54c35c37e4f9a7d7a923a7ccd792f4b7ff90.tar.gz
cpython-98ea54c35c37e4f9a7d7a923a7ccd792f4b7ff90.tar.bz2
Issue #22156: Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r--Python/getargs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 946faf2..a313269 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -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);