[CDRIVER-4822] aggressively clean up warnings in public headers Created: 01/Feb/24  Updated: 05/Feb/24

Status: Backlog
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Roberto Sanchez Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Quarter: FY25Q2
Assigned Teams:
C Drivers

 Description   

Based on a discussion arising from CDRIVER-4813 in Slack and a recommendation from colby.pike@mongodb.com in that discussion, we need to ensure that our public headers compile without warnings when the most aggressive available warning flags are enabled.

Here is Colby's suggestion:

We should continue to use -I, but very very proactively check our headers against the
most aggressive -Werror that is available for each compiler (including new ones that we aren't yet using, no need for full CI, just feed the bson.h and mongoc.h through -fsyntax-only -Werror and make sure it comes out clean.)

In a further discussion it was pointed out that while clang has a -Weverything option that enables every possible warning, the corresponding gcc -Wall does not actually enable all possible warnings. For each compiler it will be necessary to determine the correct invocation that enables the maximum possible number of warnings and then selectively disable any which may not make sense in our context.


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