From: Matt Corallo Date: Thu, 25 Jan 2024 21:42:33 +0000 (+0000) Subject: Stop using designated initializer for array in C++ demo X-Git-Tag: v0.0.121.1^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b6379bf5cf4d6e5b0aea8b29719390a0473e7218;p=ldk-c-bindings Stop using designated initializer for array in C++ demo This seems to be no issue on recent-ish compilers, but my Android compiler seems to complain about it. --- diff --git a/lightning-c-bindings/demo.cpp b/lightning-c-bindings/demo.cpp index 9cc3dc5..f9284ee 100644 --- a/lightning-c-bindings/demo.cpp +++ b/lightning-c-bindings/demo.cpp @@ -1112,7 +1112,8 @@ int main() { LDK::RecipientOnionFields invoice2_recipient(std::move(pay_params->contents.result->b)); LDK::RouteParameters invoice2_params(std::move(pay_params->contents.result->c)); assert(pay_params->result_ok); - LDKThirtyTwoBytes payment_id { .data = 0 }; + LDKThirtyTwoBytes payment_id; + memset(&payment_id, 0, 32); LDK::CResult_NoneRetryableSendFailureZ invoice_pay_res = ChannelManager_send_payment( &cm1, std::move(pay_params->contents.result->a), std::move(invoice2_recipient), std::move(payment_id), std::move(invoice2_params), Retry_attempts(0)