Commit d098098c authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

PC/_subprocess.c: Fix signed/unsigned comparison (GH-7446)

Fix the following compiler warning on Windows:
..\PC\_subprocess.c(384): warning C4018: '>' : signed/unsigned mismatch
parent 9bbb8e21
...@@ -381,7 +381,7 @@ getenvironment(PyObject* environment) ...@@ -381,7 +381,7 @@ getenvironment(PyObject* environment)
} }
totalsize = (p - PyString_AS_STRING(out)) + ksize + 1 + totalsize = (p - PyString_AS_STRING(out)) + ksize + 1 +
vsize + 1 + 1; vsize + 1 + 1;
if (totalsize > PyString_GET_SIZE(out)) { if (totalsize > (size_t)PyString_GET_SIZE(out)) {
size_t offset = p - PyString_AS_STRING(out); size_t offset = p - PyString_AS_STRING(out);
if (_PyString_Resize(&out, totalsize + 1024)) if (_PyString_Resize(&out, totalsize + 1024))
goto exit; goto exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment