Skip to content

Commit ba48a0e

Browse files
committed
Use PHONGO_BSON_INIT_STATE macro in RETVAL_BSON_T
Since php_phongo_bson_state contains other structs, using {0} as an initializer may cause "missing braces around initializer [-Werror=missing-braces]" errors on some platforms.
1 parent 9ad8571 commit ba48a0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MongoDB/ClientEncryption.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ static void phongo_clientencryption_decrypt(php_phongo_clientencryption_t* clien
4242

4343
#define RETVAL_BSON_T(reply) \
4444
do { \
45-
php_phongo_bson_state state = { 0 }; \
45+
php_phongo_bson_state state; \
46+
PHONGO_BSON_INIT_STATE(state); \
4647
if (!php_phongo_bson_to_zval_ex(bson_get_data(&(reply)), (reply).len, &state)) { \
4748
zval_ptr_dtor(&state.zchild); \
4849
goto cleanup; \

0 commit comments

Comments
 (0)