From 9f18bf79608157e67ff3f1510745bad3c2fd0d2c Mon Sep 17 00:00:00 2001 From: "J. Krieg" Date: Sun, 2 Sep 2018 18:42:44 +0200 Subject: [PATCH] src/gui-neutrino/lib/xmltree/xmlinterface.cpp: fix build when compiling with -Werror because with this the warning: warning: 'xmlgz_file' may be used uninitialized in this function [-Wmaybe-uninitialized] warning: 'xml_file' may be used uninitialized in this function [-Wmaybe-uninitialized] is treated as an error and the build aborts - so let's remove this warning... Thanks to Janus for reporting this and the suggested fix Signed-off-by: Thilo Graf --- lib/xmltree/xmlinterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/xmltree/xmlinterface.cpp b/lib/xmltree/xmlinterface.cpp index da7213806..5cb64bc09 100644 --- a/lib/xmltree/xmlinterface.cpp +++ b/lib/xmltree/xmlinterface.cpp @@ -374,8 +374,8 @@ xmlDocPtr parseXmlFile(const char * filename, bool warning_by_nonexistence /* = XMLTreeParser* tree_parser; size_t done; size_t length; - FILE* xml_file; - gzFile xmlgz_file; + FILE* xml_file = NULL; + gzFile xmlgz_file = NULL; std::string fn = filename; bool zipped = (fn.substr(fn.find_last_of(".") + 1) == "gz");