Uploaded image for project: 'Libmongocrypt'
  1. Libmongocrypt
  2. MONGOCRYPT-389

Build warning in mongocrypt_new due to missing braces in MCR_DLL_NULL assignment

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.3.1
    • Component/s: None
    • None

      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.

            Assignee:
            colby.pike@mongodb.com Colby Pike
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: