Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-243

Fails to build with gcc-4.8.2 when optimization is enabled

      When building with optimization the command_writer.cpp file fails to build due to a warning being escalated to an error:

      src/mongo/client/command_writer.cpp: In member function 'virtual void mongo::CommandWriter::write(const mongo::StringData&, const std::vector<mongo::WriteOperation*>&, bool, const mongo::WriteConcern*, std::vector<mongo::BSONObj>*)':
      src/mongo/client/command_writer.cpp:55:57: error: 'requestType' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                   if (requestType == (*iter)->operationType() &&
                                                               ^
      cc1plus: all warnings being treated as errors
      scons: *** [build/cached/mongo/client/command_writer.o] Error 1
      

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: