Patchwork D9627: cext: shut-up sign compare warnings

login
register
mail settings
Submitter phabricator
Date Dec. 17, 2020, 5:08 p.m.
Message ID <differential-rev-PHID-DREV-uqtqbnrgshgrk4bvxmeg-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47925/
State Superseded
Headers show

Comments

phabricator - Dec. 17, 2020, 5:08 p.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9627

AFFECTED FILES
  mercurial/cext/revlog.c

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -2612,7 +2612,7 @@ 
 		                "data does not support buffer interface");
 		return -1;
 	}
-	if (self->nodelen < 20 || self->nodelen > sizeof(nullid)) {
+	if (self->nodelen < 20 || self->nodelen > (Py_ssize_t)sizeof(nullid)) {
 		PyErr_SetString(PyExc_RuntimeError, "unsupported node size");
 		return -1;
 	}