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

Fix multiple coverity issues in cursor-bound-01

    • Storage Engines
    • 1
    • Storage Engines - 2022-06-27

      Redundant test

      By the time the program execution reaches the test of this condition there is only one possible outcome for the test. The code at the destination of this branch is not dead, either because this condition is always true or because there is at least one other branch that reaches it. Test always evaluates the same
      /test/cppsuite/tests/cursor_bound_01.cpp:360: DEADCODE 122242 At condition "range_exact < 0", the value of "range_exact" must be at most -1.
      /test/cppsuite/tests/cursor_bound_01.cpp:360: DEADCODE 122242 At condition "range_exact < 0", the value of "range_exact" cannot be equal to 0.
      /test/cppsuite/tests/cursor_bound_01.cpp:342: DEADCODE 122242 Condition "range_exact > 0", taking false branch. Now the value of "range_exact" is at most -1.
      /test/cppsuite/tests/cursor_bound_01.cpp:340: DEADCODE 122242 Condition "range_exact == 0", taking false branch. Now the value of "range_exact" cannot be equal to 0.
      /test/cppsuite/tests/cursor_bound_01.cpp:360: DEADCODE 122242 The condition "range_exact < 0" must be true.

            Assignee:
            jie.chen@mongodb.com Jie Chen
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: