[CDRIVER-915] Coverity analysis defect 72276: Side effect in assertion Created: 08/Oct/15  Updated: 21/Apr/17  Resolved: 14/Oct/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3.0-beta0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Assertion contains an operation with a side effect

Defect 72276 (STATIC_C)
Checker ASSERT_SIDE_EFFECT (subcategory none)
File: /tests/test-bulk.c
Function test_bulk_new
/tests/test-bulk.c, line: 2370
Assignment "error.domain = MONGOC_ERROR_CLIENT" has a side effect. This code will work differently in a non-debug build.

       assert (error.domain = MONGOC_ERROR_CLIENT);

File: /tests/test-bulk.c
Function test_bulk_new
/tests/test-bulk.c, line: 2376
Assignment "error.domain = MONGOC_ERROR_CLIENT" has a side effect. This code will work differently in a non-debug build.

       assert (error.domain = MONGOC_ERROR_CLIENT);

File: /tests/test-bulk.c
Function test_bulk_new
/tests/test-bulk.c, line: 2382
Assignment "error.domain = MONGOC_ERROR_CLIENT" has a side effect. This code will work differently in a non-debug build.

       assert (error.domain = MONGOC_ERROR_CLIENT);

File: /tests/test-bulk.c
Function test_bulk_new
/tests/test-bulk.c, line: 2388
Assignment "error.domain = MONGOC_ERROR_CLIENT" has a side effect. This code will work differently in a non-debug build.

       assert (error.domain = MONGOC_ERROR_CLIENT);



 Comments   
Comment by Githook User [ 14/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-915: Side effect in assertion
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8610fd804c75436d44b46fc4b1681ea58bc9d231

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