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

Coverity analysis defect 114074: Logically dead code

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 2
    • Storage Engines 2020-03-09, Storage Engines 2020-03-23

      Code can never be reached because of a logical contradiction

      Defect 114074 (STATIC_C)
      Checker DEADCODE (subcategory none)
      File: /test/csuite/incr_backup/main.c
      Function check_table
      /test/csuite/incr_backup/main.c, line: 637
      Assigning: "op_type" = "(OPERATION_TYPE)(total_changes % 40000UL) / 10000U".

              op_type = (OPERATION_TYPE)(total_changes % CHANGES_PER_CYCLE) / KEYS_PER_TABLE;
      

      /test/csuite/incr_backup/main.c, line: 641
      When switching on "op_type", the value of "op_type" must be between 0 and 3.

              switch (op_type) {
      

      /test/csuite/incr_backup/main.c, line: 652
      The "switch" governing value "op_type" cannot be "_OPERATION_TYPE_COUNT".

              case _OPERATION_TYPE_COUNT:
      

      /test/csuite/incr_backup/main.c, line: 652
      Execution cannot reach this statement: "case _OPERATION_TYPE_COUNT:".

              case _OPERATION_TYPE_COUNT:
      

            Assignee:
            keith.smith@mongodb.com Keith Smith
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: