parsers: fix uninitialize variable warning
authorDavid Soria Parra <davidsp@fb.com>
Wed, 24 Sep 2014 13:16:20 -0700
changeset 22540 9a860ac8c216
parent 22539 6f434ef54222
child 22541 4e1a80c022a4
parsers: fix uninitialize variable warning The heads pointer is not initialized correctly if filter is false, causing both clang and gcc to issue a warning. Correctly initialize heads to NULL.
mercurial/parsers.c
--- a/mercurial/parsers.c	Wed Sep 17 11:00:03 2014 -0700
+++ b/mercurial/parsers.c	Wed Sep 24 13:16:20 2014 -0700
@@ -854,7 +854,7 @@
 {
 	Py_ssize_t i, len, addlen;
 	char *nothead = NULL;
-	PyObject *heads;
+	PyObject *heads = NULL;
 	PyObject *filter = NULL;
 	PyObject *filteredrevs = Py_None;