# HG changeset patch # User David Soria Parra # Date 2014-09-24 20:16:20 # Node ID 9a860ac8c21658b238124ec3f0a291d4893fb3bd # Parent 6f434ef5422269dc95c315ccb899ef4d5b3c38b8 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. diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -854,7 +854,7 @@ static PyObject *index_headrevs(indexObj { Py_ssize_t i, len, addlen; char *nothead = NULL; - PyObject *heads; + PyObject *heads = NULL; PyObject *filter = NULL; PyObject *filteredrevs = Py_None;