From 7d779c6d9d3a4f31b0ad69d6bb6b1b2ed6610218 Mon Sep 17 00:00:00 2001 From: BEULAHEVANJALIN Date: Mon, 8 Sep 2025 13:33:36 +0530 Subject: [PATCH] examples/musig: use brace-enclosed initializer for 32-byte msg Switch msg initialization from a string literal to a brace-enclosed array to avoid -Wunterminated-string-initialization. Upstream removed the trailing '!' from the message; this change retains it. --- examples/musig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/musig.c b/examples/musig.c index 16dd12f3..d4a02195 100644 --- a/examples/musig.c +++ b/examples/musig.c @@ -169,7 +169,7 @@ static int sign(const secp256k1_context* ctx, struct signer_secrets *signer_secr const secp256k1_pubkey *pubkeys_ptr[N_SIGNERS]; secp256k1_xonly_pubkey agg_pk; secp256k1_musig_keyagg_cache cache; - unsigned char msg[32] = "this_could_be_the_hash_of_a_msg!"; + unsigned char msg[] = {'t', 'h', 'i', 's', '_', 'c', 'o', 'u', 'l', 'd', ' ', 'b', 'e', ' ', 't', 'h', 'e', '_', 'h', 'a', 's', 'h', '_', 'o', 'f', '_', 'a', '_', 'm', 's', 'g', '!'}; unsigned char sig[64]; /* Create a secp256k1 context */