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

implicit conversion from 'long long' to 'double' in oplog_stone_parameters_gen.cpp

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: Build, Security
    • Labels:
    • Fully Compatible
    • ALL
    • Hide

      Compile with clang-10

      Show
      Compile with clang-10
    • Execution Team 2021-09-20, Execution Team 2021-10-04

      src/mongo/bson/bsonelement.h:1021:22: error: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-
      Werror,-Wimplicit-int-float-conversion]
      if ((d > std::numeric_limits<T>::max()) || (d < std::numeric_limits<T>::lowest())) {
      ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/mongo/idl/server_parameter_with_storage.h:251:43: note: in instantiation of function template specialization 'mongo::BSONElement::tryCoerce<long long>' re
      quested here
      if (auto status = newValueElement.tryCoerce(&newValue); !status.isOK()) {
      ^
      src/mongo/idl/server_parameter_with_storage.h:192:5: note: in instantiation of member function 'mongo::IDLServerParameterWithStorage<mongo::ServerParameterTyp
      e::kStartupOnly, long long>::set' requested here
      IDLServerParameterWithStorage(StringData name, T& storage)
      ^
      src/mongo/idl/server_parameter_with_storage.h:326:16: note: in instantiation of member function 'mongo::IDLServerParameterWithStorage<mongo::ServerParameterTy
      pe::kStartupOnly, long long>::IDLServerParameterWithStorage' requested here
      return new IDLServerParameterWithStorage<paramType, T>(name, storage);
      ^
      build/opt/mongo/db/storage/wiredtiger/oplog_stone_parameters_gen.cpp:32:21: note: in instantiation of function template specialization 'mongo::makeIDLServerPa
      rameterWithStorage<mongo::ServerParameterType::kStartupOnly, long long>' requested here
      auto* ret = makeIDLServerParameterWithStorage<ServerParameterType::kStartupOnly>("maxOplogTruncationPointsAfterStartup", gMaxOplogStonesAfterStartup);

            Assignee:
            reo.kimura@mongodb.com Reo Kimura (Inactive)
            Reporter:
            liangjie.mailbox@qq.com Jiang Li
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: