0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.4.174

Problem:    Compiler warnings for Python interface. (Tony Mechelynck)
Solution:   Add type casts, initialize variable.
This commit is contained in:
Bram Moolenaar
2014-02-11 16:00:35 +01:00
parent 12a0f22340
commit 3b5226121d
2 changed files with 7 additions and 5 deletions

View File

@@ -2368,7 +2368,7 @@ ListAssSlice(ListObject *self, Py_ssize_t first,
PyInt numreplaced = 0;
PyInt numadded = 0;
PyInt size;
listitem_T **lis;
listitem_T **lis = NULL;
size = ListLength(self);
@@ -2503,8 +2503,8 @@ ListAssSlice(ListObject *self, Py_ssize_t first,
{
Py_DECREF(iterator);
PyErr_FORMAT(PyExc_ValueError,
N_("attempt to assign sequence of size greater then %d "
"to extended slice"), slicelen);
N_("attempt to assign sequence of size greater then %ld "
"to extended slice"), (long)slicelen);
list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
PyMem_Free(lis);
return -1;
@@ -2516,8 +2516,8 @@ ListAssSlice(ListObject *self, Py_ssize_t first,
if (step != 1 && i != slicelen)
{
PyErr_FORMAT2(PyExc_ValueError,
N_("attempt to assign sequence of size %d to extended slice "
"of size %d"), i, slicelen);
N_("attempt to assign sequence of size %ld to extended slice "
"of size %ld"), (long)i, (long)slicelen);
list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli);
PyMem_Free(lis);
return -1;