[CDRIVER-680] 1.1.6 debug compilation fails (for C89) Created: 19/May/15  Updated: 05/Aug/15  Resolved: 17/Jun/15

Status: Closed
Project: C Driver
Component/s: Build, libmongoc
Affects Version/s: None
Fix Version/s: 1.1.8

Type: Bug Priority: Minor - P4
Reporter: Andrew Ryder (Inactive) Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related

 Description   

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)



 Comments   
Comment by Githook User [ 05/Aug/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-680 statement followed by declaration
Branch: 1.2.0-dev
https://github.com/mongodb/mongo-c-driver/commit/3f43d637e6df2f80b0d0a55d33f59d2d7dbcda61

Comment by Githook User [ 17/Jun/15 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-680 statement followed by declaration
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/3f43d637e6df2f80b0d0a55d33f59d2d7dbcda61

Comment by A. Jesse Jiryu Davis [ 20/May/15 ]

Thanks!

On Wed, May 20, 2015 at 4:41 AM, Andrew Ryder (JIRA) <jira@mongodb.org>

Comment by Andrew Ryder (Inactive) [ 20/May/15 ]

Not blocking anything at all. Next release is just dandy. I figured that since you guys try to be C89 compatible I'd let you know of this one little oversight.

Comment by A. Jesse Jiryu Davis [ 19/May/15 ]

Thanks Andrew! Is this blocking you for anything, or is it ok to fix in the next regular release?

Generated at Wed Feb 07 21:10:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.