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

Coverity analysis defect 114074: Logically dead code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT10.0.0, 4.4.0-rc0, 4.7.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      Storage Engines 2020-03-09, Storage Engines 2020-03-23

      Description

      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:

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: