diff options
| author | David Lamparter <equinox@diac24.net> | 2021-02-02 19:27:41 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2021-02-03 11:54:24 +0100 |
| commit | cbb1337a309ada54d856071ae3efb6324d8f4477 (patch) | |
| tree | 720115cc494b5da6627ac5d016ea2639e138b479 | |
| parent | 6c3aa850ea50c3538f7a4303e3dc729dbb45c9a6 (diff) | |
lib/xref: fix initializer order for C++
[v2: drop designated initializer names]
Signed-off-by: David Lamparter <equinox@diac24.net>
| -rw-r--r-- | lib/xref.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/xref.h b/lib/xref.h index 426ffad705..b3243fa058 100644 --- a/lib/xref.h +++ b/lib/xref.h @@ -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 */ |
