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

Coverity analysis defect 100567: Logically dead code

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • WiredTiger
    • Fully Compatible
    • ALL
    • Storage 2017-03-06

    Description

      Code can never be reached because of a logical contradiction

      Defect 100567 (STATIC_C)
      Checker DEADCODE (subcategory none)
      File: /src/third_party/wiredtiger/src/btree/bt_split.c
      Function __split_root
      /src/third_party/wiredtiger/src/btree/bt_split.c, line: 665
      Assigning: "complete" = "WT_ERR_IGNORE".

          	complete = WT_ERR_IGNORE;

      /src/third_party/wiredtiger/src/btree/bt_split.c, line: 540
      Assigning: "complete" = "WT_ERR_RETURN".

          	complete = WT_ERR_RETURN;

      /src/third_party/wiredtiger/src/btree/bt_split.c, line: 686
      When switching on "complete", the value of "complete" must be in one of the following intervals: {[0,0], [2,2]}.

          err:	switch (complete) {

      /src/third_party/wiredtiger/src/btree/bt_split.c, line: 690
      The switch value "complete" cannot be "WT_ERR_PANIC".

          	case WT_ERR_PANIC:

      /src/third_party/wiredtiger/src/btree/bt_split.c, line: 690
      Execution cannot reach this statement: "case WT_ERR_PANIC:".

          	case WT_ERR_PANIC:

      Attachments

        Activity

          People

            keith.bostic@mongodb.com Keith Bostic (Inactive)
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: