Coverity analysis defect 100567: Logically dead code

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: WiredTiger
    • Fully Compatible
    • ALL
    • Storage 2017-03-06
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:
      

              Assignee:
              Keith Bostic (Inactive)
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: