From 043cf256313bfe00abbfb5021bda194fb7880ef3 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Sun, 8 Nov 2020 21:52:59 +0100 Subject: [PATCH] Fix missing initializer warnings in glib/tests/markup-subparser.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In file included from glib/glib.h:60, from glib/tests/markup-subparser.c:14: glib/gmarkup.h:161:10: note: ‘text’ declared here 161 | void (*text) (GMarkupParseContext *context, | ^~~~ glib/tests/markup-subparser.c:335:3: error: missing initializer for field ‘error_message’ of ‘TestCase’ 335 | { "", "" }, | ^ glib/tests/markup-subparser.c:275:15: note: ‘error_message’ declared here 275 | const char *error_message; | ^~~~~~~~~~~~~ glib/tests/markup-subparser.c:336:3: error: missing initializer for field ‘error_message’ of ‘TestCase’ 336 | { "", "<<{foo}{/foo}>>" }, | ^ glib/tests/markup-subparser.c:275:15: note: ‘error_message’ declared here 275 | const char *error_message; | ^~~~~~~~~~~~~ glib/tests/markup-subparser.c:337:3: error: missing initializer for field ‘error_message’ of ‘TestCase’ 337 | { "", "<<{foo}{/foo}{bar}{/bar}>>" }, | ^ glib/tests/markup-subparser.c:275:15: note: ‘error_message’ declared here 275 | const char *error_message; | ^~~~~~~~~~~~~ glib/tests/markup-subparser.c:338:3: error: missing initializer for field ‘error_message’ of ‘TestCase’ 338 | { "", "[[{foo}{bar}{/bar}{/foo}]]" }, | ^ glib/tests/markup-subparser.c:275:15: note: ‘error_message’ declared here 275 | const char *error_message; | ^~~~~~~~~~~~~ glib/tests/markup-subparser.c:339:3: error: missing initializer for field ‘error_message’ of ‘TestCase’ 339 | { "", "[[{foo}{x}{/x}{y}{/y}{/foo}]]" }, | ^ glib/tests/markup-subparser.c:275:15: note: ‘error_message’ declared here 275 | const char *error_message; | ^~~~~~~~~~~~~ glib/tests/markup-subparser.c:340:3: error: missing initializer for field ‘error_message’ of ‘TestCase’ 340 | { "", "[[{foo}{/foo}]]" }, | ^ glib/tests/markup-subparser.c:275:15: note: ‘error_message’ declared here 275 | const char *error_message; | ^~~~~~~~~~~~~ glib/tests/markup-subparser.c:342:33: error: missing initializer for field ‘error_message’ of ‘TestCase’ 342 | "[[{bar}{/bar}]]" } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ glib/tests/markup-subparser.c:275:15: note: ‘error_message’ declared here 275 | const char *error_message; | ^~~~~~~~~~~~~ --- glib/tests/markup-subparser.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/glib/tests/markup-subparser.c b/glib/tests/markup-subparser.c index f8af5fdd3..71b9ac6af 100644 --- a/glib/tests/markup-subparser.c +++ b/glib/tests/markup-subparser.c @@ -334,15 +334,15 @@ test (gconstpointer user_data) TestCase test_cases[] = /* successful runs */ { - /* in */ /* out */ - { "", "" }, - { "", "<<{foo}{/foo}>>" }, - { "", "<<{foo}{/foo}{bar}{/bar}>>" }, - { "", "[[{foo}{bar}{/bar}{/foo}]]" }, - { "", "[[{foo}{x}{/x}{y}{/y}{/foo}]]" }, - { "", "[[{foo}{/foo}]]" }, + /* in */ /* out */ /* error */ + { "", "", NULL }, + { "", "<<{foo}{/foo}>>", NULL }, + { "", "<<{foo}{/foo}{bar}{/bar}>>", NULL }, + { "", "[[{foo}{bar}{/bar}{/foo}]]", NULL }, + { "", "[[{foo}{x}{/x}{y}{/y}{/foo}]]", NULL }, + { "", "[[{foo}{/foo}]]", NULL }, { "", "<<{foo}{/foo}>>" - "[[{bar}{/bar}]]" } + "[[{bar}{/bar}]]", NULL } }; TestCase error_cases[] = /* error cases */