summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Fleury <emmanuel.fleury@gmail.com>2020-11-08 21:24:07 +0100
committerEmmanuel Fleury <emmanuel.fleury@gmail.com>2020-11-13 10:13:49 +0100
commit24c60cee6c5de50b38c535e00e9741becf28c76c (patch)
treeda4ac313536ccbac29b694af2527c47a6b0d84c3
parent6c74ab7fcc8c8b6916d06b73b212ee88176fc76d (diff)
downloadglib-24c60cee6c5de50b38c535e00e9741becf28c76c.tar.gz
Fix missing initializer warnings in glib/tests/markup-collect.c
glib/gmarkup.h:154:10: note: ‘end_element’ declared here 154 | void (*end_element) (GMarkupParseContext *context, | ^~~~~~~~~~~ glib/tests/markup-collect.c:94:3: error: missing initializer for field ‘error_code’ of ‘struct test’ 94 | { "<bool mb='false'/>", "<bool(1) 0 0 -1>" }, | ^ glib/tests/markup-collect.c:85:17: note: ‘error_code’ declared here 85 | GMarkupError error_code; | ^~~~~~~~~~ glib/tests/markup-collect.c:95:3: error: missing initializer for field ‘error_code’ of ‘struct test’ 95 | { "<bool mb='true'/>", "<bool(1) 1 0 -1>" }, | ^ glib/tests/markup-collect.c:85:17: note: ‘error_code’ declared here 85 | GMarkupError error_code; | ^~~~~~~~~~ glib/tests/markup-collect.c:96:3: error: missing initializer for field ‘error_code’ of ‘struct test’ 96 | { "<bool mb='t' ob='f' tri='1'/>", "<bool(1) 1 0 1>" }, | ^ glib/tests/markup-collect.c:85:17: note: ‘error_code’ declared here 85 | GMarkupError error_code; | ^~~~~~~~~~ glib/tests/markup-collect.c:97:3: error: missing initializer for field ‘error_code’ of ‘struct test’ 97 | { "<bool mb='y' ob='n' tri='0'/>", "<bool(1) 1 0 0>" }, | ^ glib/tests/markup-collect.c:85:17: note: ‘error_code’ declared here 85 | GMarkupError error_code; | ^~~~~~~~~~ glib/tests/markup-collect.c:99:3: error: missing initializer for field ‘error_code’ of ‘struct test’ 99 | { "<bool mb='y' my:attr='q'><my:tag/></bool>", "<bool(1) 1 0 -1>" }, | ^ glib/tests/markup-collect.c:85:17: note: ‘error_code’ declared here 85 | GMarkupError error_code; | ^~~~~~~~~~ glib/tests/markup-collect.c:100:3: error: missing initializer for field ‘error_code’ of ‘struct test’ 100 | { "<bool mb='y' my:attr='q'><my:tag>some <b>text</b> is in here</my:tag></bool>", "<bool(1) 1 0 -1>" }, | ^ glib/tests/markup-collect.c:85:17: note: ‘error_code’ declared here 85 | GMarkupError error_code; | ^~~~~~~~~~ glib/tests/markup-collect.c:111:3: error: missing initializer for field ‘error_code’ of ‘struct test’ 111 | { "<str cm='x' am='y'/>", "<str(1) x y (null) (null)>" }, | ^ glib/tests/markup-collect.c:85:17: note: ‘error_code’ declared here 85 | GMarkupError error_code; | ^~~~~~~~~~
-rw-r--r--glib/tests/markup-collect.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/glib/tests/markup-collect.c b/glib/tests/markup-collect.c
index 0c2757a34..b796b4238 100644
--- a/glib/tests/markup-collect.c
+++ b/glib/tests/markup-collect.c
@@ -91,13 +91,14 @@ static struct test tests[] =
{ "<bool mb='y'>", "<bool(1) 1 0 -1>",
G_MARKUP_ERROR_PARSE, "'bool'" },
- { "<bool mb='false'/>", "<bool(1) 0 0 -1>" },
- { "<bool mb='true'/>", "<bool(1) 1 0 -1>" },
- { "<bool mb='t' ob='f' tri='1'/>", "<bool(1) 1 0 1>" },
- { "<bool mb='y' ob='n' tri='0'/>", "<bool(1) 1 0 0>" },
+ { "<bool mb='false'/>", "<bool(1) 0 0 -1>", 0, NULL },
+ { "<bool mb='true'/>", "<bool(1) 1 0 -1>", 0, NULL },
+ { "<bool mb='t' ob='f' tri='1'/>", "<bool(1) 1 0 1>", 0, NULL },
+ { "<bool mb='y' ob='n' tri='0'/>", "<bool(1) 1 0 0>", 0, NULL },
- { "<bool mb='y' my:attr='q'><my:tag/></bool>", "<bool(1) 1 0 -1>" },
- { "<bool mb='y' my:attr='q'><my:tag>some <b>text</b> is in here</my:tag></bool>", "<bool(1) 1 0 -1>" },
+ { "<bool mb='y' my:attr='q'><my:tag/></bool>", "<bool(1) 1 0 -1>", 0, NULL },
+ { "<bool mb='y' my:attr='q'><my:tag>some <b>text</b> is in here</my:tag></bool>",
+ "<bool(1) 1 0 -1>", 0, NULL },
{ "<bool ob='y'/>", "<bool(0) 0 0 -1>",
G_MARKUP_ERROR_MISSING_ATTRIBUTE, "'mb'" },
@@ -108,7 +109,7 @@ static struct test tests[] =
{ "<bool mb='y' tri='y' tri='n'/>", "<bool(0) 0 0 -1>",
G_MARKUP_ERROR_INVALID_CONTENT, "'tri'" },
- { "<str cm='x' am='y'/>", "<str(1) x y (null) (null)>" },
+ { "<str cm='x' am='y'/>", "<str(1) x y (null) (null)>", 0, NULL },
{ "<str am='x' co='y'/>", "<str(0) (null) (null) (null) (null)>",
G_MARKUP_ERROR_MISSING_ATTRIBUTE, "'cm'" },