]> granicus.if.org Git - libexpat/commitdiff
Fix structure initialisation not to cause warnings
authorRhodri James <rhodri@kynesim.co.uk>
Tue, 21 Feb 2017 15:29:31 +0000 (15:29 +0000)
committerSebastian Pipping <sebastian@pipping.org>
Sun, 16 Jul 2017 16:56:23 +0000 (18:56 +0200)
expat/tests/runtests.c

index d971cbe691cf768e1154a7c67c7885fef4e58221..c4b461e88e741b2b73fe2b124df38d6e1c3bd338 100644 (file)
@@ -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)