[CDRIVER-3881] Assert or handle all functions with unused returns Created: 02/Feb/21 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Functions like bson_iter_init or bson_iter_recurse consistently are not checked for return values in the code base. Some cases are not expected to fail (on BSON we create) but some may fail on malformed input. We may do well do add assertions on such cases, so users will get a more sensible error or stack trace in the possibly rare event that this could occur. |