]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib/xref: fix initializer order for C++ 8004/head
authorDavid Lamparter <equinox@diac24.net>
Tue, 2 Feb 2021 18:27:41 +0000 (19:27 +0100)
committerDavid Lamparter <equinox@diac24.net>
Wed, 3 Feb 2021 10:54:24 +0000 (11:54 +0100)
[v2: drop designated initializer names]

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/xref.h

index 426ffad705ba0b520762322a019cde09a41a263a..b3243fa058daa2ea6498d1030e9cf3139c17e101 100644 (file)
@@ -144,8 +144,11 @@ extern const struct xref * const __stop_xref_array[1] DSO_LOCAL;
  */
 #define XREF_SETUP()                                                           \
        static const struct xref _dummy_xref = {                               \
-                       .file = __FILE__, .line = __LINE__, .func = "dummy",   \
-                       .type = XREFT_NONE,                                    \
+                       /* .xrefdata = */ NULL,                                \
+                       /* .type = */ XREFT_NONE,                              \
+                       /* .line = */ __LINE__,                                \
+                       /* .file = */ __FILE__,                                \
+                       /* .func = */ "dummy",                                 \
        };                                                                     \
        static const struct xref * const _dummy_xref_p                         \
                        __attribute__((used, section("xref_array")))           \
@@ -251,8 +254,11 @@ struct _xref_p {
 /* initializer for a "struct xref" */
 #define XREF_INIT(type_, xrefdata_, func_)                                     \
        {                                                                      \
-               .type = (type_), .xrefdata = (xrefdata_),                      \
-               .file = __FILE__, .line = __LINE__, .func = func_,             \
+               /* .xrefdata = */ (xrefdata_),                                 \
+               /* .type = */ (type_),                                         \
+               /* .line = */ __LINE__,                                        \
+               /* .file = */ __FILE__,                                        \
+               /* .func = */ func_,                                           \
        }                                                                      \
        /* end */