Client facing headers should compile cleanly with gcc's -Wall -Werror flags set

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 1.5.7
    • Affects Version/s: 1.5.3
    • Component/s: Internal Client
    • None
    • Environment:
      All GCC based systems
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently (http://github.com/mongodb/mongo/commit/462feb5a9fc4388121347e2557c9f30cefe2c222), bson/bsoninlines.h fails to compile if the client codebase builds things with -Wall -Werror:

      One specific example:

      mongo.temp.install/include/mongo/bson/../bson/bsoninlines.h: In member function 'void mongo::BSONElement::validate() const':
      mongo.temp.install/include/mongo/bson/../bson/bsoninlines.h:276: warning: comparison between signed and unsigned integer expressions

      Compiling all files with -Wall -Werror is a very common practice in GCC based projects, and codebases where this is required and done automatically as part of the build will not be able to use the mongo headers unless they build cleanly in this mode. FWIW, you should probably turn on whatever Visual Studio's most draconian warning level is, and make warnings errors there as well.

            Assignee:
            Eliot Horowitz (Inactive)
            Reporter:
            Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: