1.1.6 debug compilation fails (for C89)

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 1.1.8
    • Affects Version/s: None
    • Component/s: Build, libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
              A. Jesse Jiryu Davis
              Reporter:
              Andrew Ryder (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: