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

"missing braces around initializer" warning when compiling mongocrypt-traverse-util.c

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.0.1
    • Component/s: None
    • None
    • Environment:
      gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

      I noticed two build warnings when compiling libmongocrypt with PHPC. This may be the result of our aggressive build flags being applied to libmongocrypt sources, which andreas.braun may want to address separately.

      I still wanted to open a ticket just in case this is something that should be fixed in libmongocrypt.

      src/libmongocrypt/src/mongocrypt-traverse-util.c: In function ‘_mongocrypt_transform_binary_in_bson’:
      src/libmongocrypt/src/mongocrypt-traverse-util.c:172:38: warning: missing braces around initializer [-Wmissing-braces]
          _recurse_state_t starting_state = {ctx,
                                            ^
      src/libmongocrypt/src/mongocrypt-traverse-util.c:180:39:
                                             0};
                                             {}
      src/libmongocrypt/src/mongocrypt-traverse-util.c: In function ‘_mongocrypt_traverse_binary_in_bson’:
      src/libmongocrypt/src/mongocrypt-traverse-util.c:205:38: warning: missing braces around initializer [-Wmissing-braces]
          _recurse_state_t starting_state = {ctx,
                                            ^
      src/libmongocrypt/src/mongocrypt-traverse-util.c:213:39:
                                             0};
                                             {}
      

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

              Created:
              Updated:
              Resolved: