Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4822

aggressively clean up warnings in public headers

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • None
    • None
    • None
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            roberto.sanchez@mongodb.com Roberto Sanchez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: