From: David Lamparter Date: Tue, 2 Feb 2021 18:27:41 +0000 (+0100) Subject: lib/xref: fix initializer order for C++ X-Git-Tag: base_8.0~432^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=cbb1337a309ada54d856071ae3efb6324d8f4477;p=mirror%2Ffrr.git lib/xref: fix initializer order for C++ [v2: drop designated initializer names] Signed-off-by: David Lamparter --- 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 */