[PATCH 1 of 2 remotefilelog-ext] remotefilelog: don't assign a size_t to an int

Martin von Zweigbergk martinvonz at google.com
Tue Apr 4 13:32:33 EDT 2017


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1491326717 25200
#      Tue Apr 04 10:25:17 2017 -0700
# Node ID c6a91402499e92d3829761521436ead8a42dc2ee
# Parent  e0c13e2aa439be27c87f2e1edce7cfdf44837184
remotefilelog: don't assign a size_t to an int

On some platforms, size_t is 64 bits and int is 32 bits.

diff -r e0c13e2aa439 -r c6a91402499e ctreemanifest/treemanifest.cpp
--- a/ctreemanifest/treemanifest.cpp	Mon Apr 03 17:24:08 2017 -0700
+++ b/ctreemanifest/treemanifest.cpp	Tue Apr 04 10:25:17 2017 -0700
@@ -508,7 +508,7 @@
   memcpy(this->parents[1].node, NULLID, BIN_NODE_SIZE);
 
   bool alreadyExists = false;
-  int matchingParent = -1;
+  size_t matchingParent = -1;
   bool isRootManifest = this->mainStack.size() == 1;
 
   // Record the nodes of all cmp manifest equivalents


More information about the Mercurial-devel mailing list