From: Victor Stinner Date: Thu, 30 Apr 2020 22:44:03 +0000 (+0200) Subject: bpo-1635741: Fix compiler warning in _stat.c (GH-19822) X-Git-Tag: v3.9.0b1~232 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b66c0ff8af0c1a4adc6908897b2d05afc78cc27e;p=thirdparty%2FPython%2Fcpython.git bpo-1635741: Fix compiler warning in _stat.c (GH-19822) Cast Py_ARRAY_LENGTH() size_t to int explicitly. --- diff --git a/Modules/_stat.c b/Modules/_stat.c index 45a4e080c774..c7090c02688d 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; }