From: Christian Heimes Date: Tue, 21 Apr 2015 08:57:41 +0000 (+0200) Subject: Get rid of unused-but-set-variable warning. len and len2 should be equal and len2... X-Git-Tag: v3.5.0b1~314 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8714cfdc4aeedce96fb40c73f7226535fbe7833f;p=python Get rid of unused-but-set-variable warning. len and len2 should be equal and len2 is technically more correct, too. --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 90d820fa81..ce34b3b0b8 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -9891,7 +9891,7 @@ os_confstr_impl(PyModuleDef *module, int name) return PyErr_NoMemory(); len2 = confstr(name, buf, len); assert(len == len2); - result = PyUnicode_DecodeFSDefaultAndSize(buf, len-1); + result = PyUnicode_DecodeFSDefaultAndSize(buf, len2-1); PyMem_Free(buf); } else