Mercurial > hg-stable
changeset 36710:340e4b711df7
bdiff: avoid pointer arithmetic on void*
MSVC 2008 complains:
mercurial/cext/bdiff.c(106) : error C2036: 'void *' : unknown size
mercurial/cext/bdiff.c(107) : error C2036: 'void *' : unknown size
Maybe it's a gcc extension?
https://stackoverflow.com/questions/37460579/error-c2036-void-unknown-size
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 03 Mar 2018 23:29:40 -0500 |
parents | 66f2e622a2ed |
children | 68328202f270 |
files | mercurial/cext/bdiff.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cext/bdiff.c Sat Mar 03 19:26:30 2018 -0500 +++ b/mercurial/cext/bdiff.c Sat Mar 03 23:29:40 2018 -0500 @@ -103,8 +103,8 @@ } /* we can almost add: if (li == lmax) lcommon = li; */ - an = bdiff_splitlines(ba.buf + lcommon, la - lcommon, &al); - bn = bdiff_splitlines(bb.buf + lcommon, lb - lcommon, &bl); + an = bdiff_splitlines((char *)ba.buf + lcommon, la - lcommon, &al); + bn = bdiff_splitlines((char *)bb.buf + lcommon, lb - lcommon, &bl); if (!al || !bl) { PyErr_NoMemory(); goto cleanup;