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

Add missing braces around struct initializer

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.4
    • Affects Version/s: 1.0.3
    • Component/s: C library
    • None

      I observed the following build warnings when compiling libmongocrypt with PHP:

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

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

              Created:
              Updated:
              Resolved: