Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1274

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

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

      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 Eliot Horowitz (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: