[Updated] D8760: cext: remove unused variables

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Thu Jul 16 17:59:38 UTC 2020


Closed by commit rHG9719e118e4af: cext: remove unused variables (authored by joerg.sonnenberger).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D8760?vs=21947&id=21948#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8760?vs=21947&id=21948

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8760/new/

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

AFFECTED FILES
  mercurial/cext/manifest.c
  mercurial/cext/revlog.c

CHANGE DETAILS

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -752,7 +752,6 @@
                              char phase)
 {
 	Py_ssize_t len = index_length(self);
-	PyObject *iter;
 	PyObject *item;
 	PyObject *iterator;
 	int rev, minrev = -1;
@@ -790,14 +789,12 @@
 	static const char trackedphases[] = {1, 2, 32, 96};
 	PyObject *ret = NULL;
 	PyObject *roots = Py_None;
-	PyObject *idx = NULL;
 	PyObject *pyphase = NULL;
 	PyObject *pyrev = NULL;
 	PyObject *phaseroots = NULL;
 	PyObject *phasessize = NULL;
 	PyObject *phasesets[4] = {NULL, NULL, NULL, NULL};
 	Py_ssize_t len = index_length(self);
-	const char *currentphase;
 	char *phases = NULL;
 	int minphaserev = -1, rev, i;
 	const int numphases = (int)(sizeof(phasesets) / sizeof(phasesets[0]));
@@ -880,7 +877,7 @@
 	phaseroots = _dict_new_presized(numphases);
 	if (phaseroots == NULL)
 		goto release;
-	for (int i = 0; i < numphases; ++i) {
+	for (i = 0; i < numphases; ++i) {
 		pyphase = PyInt_FromLong(trackedphases[i]);
 		if (pyphase == NULL)
 			goto release;
diff --git a/mercurial/cext/manifest.c b/mercurial/cext/manifest.c
--- a/mercurial/cext/manifest.c
+++ b/mercurial/cext/manifest.c
@@ -103,8 +103,6 @@
 {
 	char flag;
 	PyObject *hash = nodeof(l, &flag);
-	ssize_t hlen;
-	Py_ssize_t hplen, flen;
 	PyObject *flags;
 	PyObject *tup;
 
@@ -296,7 +294,6 @@
 	Py_ssize_t pl;
 	line *l;
 	char flag;
-	Py_ssize_t consumed;
 	PyObject *ret = NULL, *path = NULL, *hash = NULL, *flags = NULL;
 	l = lmiter_nextline((lmIter *)o);
 	if (!l) {



To: joerg.sonnenberger, #hg-reviewers
Cc: martinvonz, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200716/ef9215cb/attachment-0002.html>


More information about the Mercurial-patches mailing list