[glib: 9/15] Fix missing initializer warnings in glib/tests/markup-subparser.c




commit 043cf256313bfe00abbfb5021bda194fb7880ef3
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date:   Sun Nov 8 21:52:59 2020 +0100

    Fix missing initializer warnings in glib/tests/markup-subparser.c
    
    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 |   { "<test/>",                  "<test></test>" },
          |   ^
    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 |   { "<sub><foo/></sub>",        "<sub><<{foo}{/foo}>></sub>" },
          |   ^
    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 |   { "<sub><foo/><bar/></sub>",  "<sub><<{foo}{/foo}{bar}{/bar}>></sub>" },
          |   ^
    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/></foo>",        "<foo>[[{foo}{bar}{/bar}{/foo}]]</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/><y/></foo>",      "<foo>[[{foo}{x}{/x}{y}{/y}{/foo}]]</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>[[{foo}{/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}{/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 */
-  { "<test/>",                  "<test></test>" },
-  { "<sub><foo/></sub>",        "<sub><<{foo}{/foo}>></sub>" },
-  { "<sub><foo/><bar/></sub>",  "<sub><<{foo}{/foo}{bar}{/bar}>></sub>" },
-  { "<foo><bar/></foo>",        "<foo>[[{foo}{bar}{/bar}{/foo}]]</foo>" },
-  { "<foo><x/><y/></foo>",      "<foo>[[{foo}{x}{/x}{y}{/y}{/foo}]]</foo>" },
-  { "<foo/>",                   "<foo>[[{foo}{/foo}]]</foo>" },
+  /* in */                    /* out */                               /* error */
+  { "<test/>",                  "<test></test>",                            NULL },
+  { "<sub><foo/></sub>",        "<sub><<{foo}{/foo}>></sub>",               NULL },
+  { "<sub><foo/><bar/></sub>",  "<sub><<{foo}{/foo}{bar}{/bar}>></sub>",    NULL },
+  { "<foo><bar/></foo>",        "<foo>[[{foo}{bar}{/bar}{/foo}]]</foo>",    NULL },
+  { "<foo><x/><y/></foo>",      "<foo>[[{foo}{x}{/x}{y}{/y}{/foo}]]</foo>", NULL },
+  { "<foo/>",                   "<foo>[[{foo}{/foo}]]</foo>",               NULL },
   { "<sub><foo/></sub><bar/>",  "<sub><<{foo}{/foo}>></sub>"
-                                "<bar>[[{bar}{/bar}]]</bar>" }
+                                "<bar>[[{bar}{/bar}]]</bar>",               NULL }
 };
 
 TestCase error_cases[] = /* error cases */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]