From 476bd5ea97df153cb8faf34f600f2235051ccd8b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 12 Sep 2016 15:33:26 -0400 Subject: Fix warning in _PyCFunction_FastCallKeywords() Issue #28105. --- Objects/methodobject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 19e8114..c2001f0 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -273,7 +273,7 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack, Py_ssize_t nargs, PyObject *kwnames) { PyObject *kwdict, *result; - Py_ssize_t nkwargs; + Py_ssize_t nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames); assert(PyCFunction_Check(func)); assert(nargs >= 0); @@ -282,7 +282,6 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack, /* kwnames must only contains str strings, no subclass, and all keys must be unique */ - nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames); if (nkwargs > 0) { kwdict = _PyStack_AsDict(stack + nargs, kwnames); if (kwdict == NULL) { -- cgit v0.12