Patchwork D12626: revlog: use %d to format int instead of %lu (issue6565)

login
register
mail settings
Submitter phabricator
Date May 17, 2022, 6:15 p.m.
Message ID <differential-rev-PHID-DREV-hbc3ks6tpxlq64hue2st-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50979/
State New
Headers show

Comments

phabricator - May 17, 2022, 6:15 p.m.
av6 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The issue says gcc warns that the data types don't match. I couldn't reproduce
  the warning locally for some reason, but this patch shouldn't break things.
  Maybe %lu was simply a copy-paste error from 6b1eae313b2f <https://phab.mercurial-scm.org/rHG6b1eae313b2f020caec500465d44db04cde572e5>
  (https://phab.mercurial-scm.org/D10625).

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cext/revlog.c

CHANGE DETAILS




To: av6, #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
@@ -497,7 +497,7 @@ 
 	if (self->format_version != format_v1) {
 		PyErr_Format(PyExc_RuntimeError,
 		             "version header should go in the docket, not the "
-		             "index: %lu",
+		             "index: %d",
 		             header);
 		return NULL;
 	}