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

Coverity analysis defect 114159: Redundant test

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.0, 4.4.0-rc6, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Storage - Ra 2020-05-18

      Test always evaluates the same

      Defect 114159 (STATIC_C)
      Checker DEADCODE (subcategory redundant_test)
      File: /src/txn/txn_ckpt.c
      Function __wt_checkpoint_close
      /src/txn/txn_ckpt.c, line: 1832
      At condition "final", the value of "final" must be equal to 0.

                    (!F_ISSET(S2C(session), WT_CONN_FILE_CLOSE_SYNC) && !metadata && !final)))
      

      /src/txn/txn_ckpt.c, line: 1812
      Condition "final", taking false branch. Now the value of "final" is equal to 0.

              if (final && !metadata)
      

      /src/txn/txn_ckpt.c, line: 1830
      The condition "!final" must be true.

              if (btree->modified && !bulk && !__wt_btree_immediately_durable(session) &&
      

            Assignee:
            chenhao.qu@mongodb.com Chenhao Qu
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: