Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-680

1.1.6 debug compilation fails (for C89)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.1.8
    • Affects Version/s: None
    • Component/s: Build, libmongoc
    • None

      https://github.com/mongodb/mongo-c-driver/blob/master/src/mongoc/mongoc-write-command.c#L511

         BSON_ASSERT (max_bson_size);
      
         /* max BSON object size + 16k - 2 bytes for ending NUL bytes.
          * server guarantees there is enough room: SERVER-10643
          */
         int32_t max_cmd_size = max_bson_size + 16382;
      

      Statement followed by variable dec in the same scope is not permitted in C89 (only affects compilations with a meaningful BSON_ASSERT, e.g DEBUG)

      (this appears to be the only instance in the code base)

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: