[Python-checkins] bpo-1635741: Fix compiler warning in _stat.c (GH-19822)
Victor Stinner
webhook-mailer at python.org
Thu Apr 30 18:44:07 EDT 2020
https://github.com/python/cpython/commit/b66c0ff8af0c1a4adc6908897b2d05afc78cc27e
commit: b66c0ff8af0c1a4adc6908897b2d05afc78cc27e
branch: master
author: Victor Stinner <vstinner at python.org>
committer: GitHub <noreply at github.com>
date: 2020-05-01T00:44:03+02:00
summary:
bpo-1635741: Fix compiler warning in _stat.c (GH-19822)
Cast Py_ARRAY_LENGTH() size_t to int explicitly.
files:
M Modules/_stat.c
diff --git a/Modules/_stat.c b/Modules/_stat.c
index 45a4e080c7746..c7090c02688de 100644
--- a/Modules/_stat.c
+++ b/Modules/_stat.c
@@ -563,7 +563,7 @@ stat_exec(PyObject *module)
"ST_CTIME"
};
- for (int i = 0; i < Py_ARRAY_LENGTH(st_constants); i++) {
+ for (int i = 0; i < (int)Py_ARRAY_LENGTH(st_constants); i++) {
if (PyModule_AddIntConstant(module, st_constants[i], i) < 0) {
return -1;
}
More information about the Python-checkins
mailing list