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 <dbt@novatux.de>


Origin commit data
------------------
Branch: ni/coolstream
Commit: 13ab6e92a0
Author: J. Krieg <bellum07@googlemail.com>
Date: 2018-09-02 (Sun, 02 Sep 2018)

Origin message was:
------------------
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 <dbt@novatux.de>


------------------
This commit was generated by Migit
This commit is contained in:
J. Krieg
2018-09-02 21:21:03 +02:00
committed by vanhofen
parent d2b4216762
commit 1642db7b11

View File

@@ -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");