From 894033fab8487164d7e2f20141bca8ad75d28311 Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 21 Feb 2017 15:29:31 +0000 Subject: [PATCH] Fix structure initialisation not to cause warnings --- expat/tests/runtests.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index d971cbe6..c4b461e8 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -2031,6 +2031,12 @@ START_TEST(test_attributes) info[0].attributes = doc_info; info[1].attributes = tag_info; + /* Silence some warnings: doc_info and tag_info are not computable + * at load time, making the variable initialisation harder. + */ + info[0].attributes = doc_info; + info[1].attributes = tag_info; + XML_SetStartElementHandler(parser, counting_start_element_handler); XML_SetUserData(parser, info); if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)