diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-02-04 09:07:17 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-02-04 09:07:17 (GMT) |
commit | ed4de13f0607c41d953269375d45af3f5f3979a4 (patch) | |
tree | 17dcbc51a589ab60fe38436b7ea31d9028d19ab2 /Include | |
parent | 5a001eea5b9da4f2bd099f3156ba75903c9b949d (diff) | |
parent | c7611362b425277da80b2397e0abedee58138996 (diff) | |
download | cpython-ed4de13f0607c41d953269375d45af3f5f3979a4.zip cpython-ed4de13f0607c41d953269375d45af3f5f3979a4.tar.gz cpython-ed4de13f0607c41d953269375d45af3f5f3979a4.tar.bz2 |
Issue #27867: Silenced may-be-used-uninitialized warnings after
using PySlice_GetIndicesEx() in debug builds.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/sliceobject.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Include/sliceobject.h b/Include/sliceobject.h index 5359369..3626354 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); |