mruby-bigint: fix clang warning for struct initialization

add extra braces for nested struct initialization to satisfy
clang's -Wmissing-braces warning.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-11 13:59:54 +09:00
parent 99d4629d59
commit 48e7592801
+1 -1
View File
@@ -51,7 +51,7 @@ typedef struct mpz_context {
/* Convenience macros for context creation */
#define MPZ_CTX_INIT(mrb_ptr, ctx, pool_ptr) \
mpz_pool_t pool ## _storage = {0};\
mpz_pool_t pool ## _storage = {{0}};\
mpz_pool_t *pool_ptr = &pool ## _storage;\
mpz_ctx_t ctx ## _struct = ((mpz_ctx_t){.mrb = (mrb_ptr), .pool = (pool_ptr)}); \
mpz_ctx_t *ctx = &(ctx ## _struct);