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

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

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

      Compile with clang-10

      Show
      Compile with clang-10
    • Execution Team 2021-08-23

      src/mongo/util/summation.cpp:55:40: error: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
      
      if (_sum > limits::min() && _sum < limits::max())
      
                                                             ~ ^~~~~~~~~~~~~
      
       
      
      src/mongo/util/summation.cpp:64:17: error: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
       if (_sum == limits::max())
      
                    ~~ ^~~~~~~~~~~~~
      
       
      
      src/mongo/util/summation.cpp:81:17: error: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion]
      
      if (_sum == std::numeric_limits<long long>::max()) {
      
                    ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            liangjie.mailbox@qq.com Jiang Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: