[MONGOCRYPT-389] Build warning in mongocrypt_new due to missing braces in MCR_DLL_NULL assignment Created: 02/Mar/22  Updated: 28/Oct/23  Resolved: 09/Mar/22

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: 1.3.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Colby Pike
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to MONGOCRYPT-373 Try to dynamically load csfle from mo... Closed
related to PHPC-2031 Upgrade libmongoc to 1.21.1 and libmo... Closed

 Description   

I encountered the following build warning while compiling bundled libmongocrypt 1.3.1 with PHPC:

In file included from /phpc/src/libmongocrypt/src/mongocrypt-private.h:24,
                 from /phpc/src/libmongocrypt/src/mongocrypt.c:24:
/phpc/src/libmongocrypt/src/mongocrypt.c: In function 'mongocrypt_new':
/phpc/src/libmongocrypt/src/mongocrypt-dll-private.h:16:23: warning: missing braces around initializer [-Wmissing-braces]
   16 | #define MCR_DLL_NULL ((mcr_dll){._native_handle = NULL, .error_string = NULL})
      |                       ^
/phpc/src/libmongocrypt/src/mongocrypt.c:132:23: note: in expansion of macro 'MCR_DLL_NULL'
  132 |    crypt->csfle_lib = MCR_DLL_NULL;
      |                       ^~~~~~~~~~~~

This was introduced by bee26c6 for MONGOCRYPT-373.



 Comments   
Comment by Colby Pike [ 09/Mar/22 ]

Addressed in https://github.com/mongodb/libmongocrypt/pull/256

Generated at Thu Feb 08 09:08:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.