From: Serhiy Storchaka Date: Sat, 4 Feb 2017 09:04:00 +0000 (+0200) Subject: Issue #27867: Silenced may-be-used-uninitialized warnings after X-Git-Tag: v3.6.1rc1~115^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7611362b425277da80b2397e0abedee58138996;p=thirdparty%2FPython%2Fcpython.git Issue #27867: Silenced may-be-used-uninitialized warnings after using PySlice_GetIndicesEx() in debug builds. --- diff --git a/Include/sliceobject.h b/Include/sliceobject.h index 535936901268..362635446070 100644 --- a/Include/sliceobject.h +++ b/Include/sliceobject.h @@ -46,8 +46,9 @@ PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length, #if !defined(Py_LIMITED_API) || (Py_LIMITED_API+0 >= 0x03050400 && Py_LIMITED_API+0 < 0x03060000) || Py_LIMITED_API+0 >= 0x03060100 #define PySlice_GetIndicesEx(slice, length, start, stop, step, slicelen) ( \ - PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? -1 : \ - ((*slicelen = PySlice_AdjustIndices((length), (start), (stop), *(step))), \ + PySlice_Unpack((slice), (start), (stop), (step)) < 0 ? \ + ((*(slicelen) = 0), -1) : \ + ((*(slicelen) = PySlice_AdjustIndices((length), (start), (stop), *(step))), \ 0)) PyAPI_FUNC(int) PySlice_Unpack(PyObject *slice, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);