Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9707

Fix a compiler warning in workgen

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • 1
    • StorEng - Defined Pipeline

      I noticed there is a complier warning for workgen in evergreen:

      [2022/08/02 02:11:58.993] [262/536] Building CXX object bench/workgen/CMakeFiles/workgen_cxx.dir/workgen.cxx.o
       [2022/08/02 02:11:58.993] ../bench/workgen/workgen.cxx:1197:33: warning: implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 [-Wimplicit-const-int-float-conversion]
       [2022/08/02 02:11:58.993]     return (((float)r * sign) / UINT32_MAX);
       [2022/08/02 02:11:58.993]                               ~ ^~~~~~~~~~
       [2022/08/02 02:11:58.993] /usr/include/stdint.h:129:23: note: expanded from macro 'UINT32_MAX'
       [2022/08/02 02:11:58.993] # define UINT32_MAX             (4294967295U)
       [2022/08/02 02:11:58.993]                                  ^~~~~~~~~~~
       [2022/08/02 02:11:58.993] 1 warning generated.
      

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: