[CDRIVER-2041] Compiler warnings in test-bson.c Created: 09/Feb/17  Updated: 06/Mar/17  Resolved: 02/Mar/17

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: 1.6.0
Fix Version/s: 1.6.1

Type: Bug Priority: Major - P3
Reporter: Petr Pisar Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

GCC 7 on GNU/Linux


Attachments: Text File libbson-1.6.0-Silent-compiler-warnings.patch    

 Description   

When building libbson-1.6.0, I can see compiler warnings like this :

    tests/test-bson.c:1709:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
        ASSERT (buf = bson_reserve_buffer (&stack_alloced, src.len));

and yet another one about unused variable. Attached patch fixes it.



 Comments   
Comment by A. Jesse Jiryu Davis [ 02/Mar/17 ]

r1.6: https://github.com/mongodb/libbson/commit/7aca898ec9b25d60a15ce3bbad4cd51b5a16b0cd

Comment by Githook User [ 02/Mar/17 ]

Author:

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

Message: CDRIVER-2041 gcc 7 warnings

Thanks to Petr Pisar for the patch.
Branch: master
https://github.com/mongodb/libbson/commit/f5f7a11dfea2fc4251ef75ae30b96542800ed527

Comment by A. Jesse Jiryu Davis [ 13/Feb/17 ]

Thanks Petr!

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