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

Coverity analysis defect 120712: 'Constant' variable guards dead code

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.0.4, 4.4.10, 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage - Ra 2021-10-04

      'Constant' variable guards dead code

      A variable being assigned only once may be intentionally guarding disabled code, or it may represent incomplete logic where a missing assignment would make the variable not be constant. Variable assigned once to a constant guards dead code.
      /test/csuite/tiered_abort/main.c:310: DEADCODE 120712 Assigning: "durable_ahead_commit" = "false".
      /test/csuite/tiered_abort/main.c:401: DEADCODE 120712 Condition "durable_ahead_commit", taking false branch. Now the value of "durable_ahead_commit" is equal to 0.
      /test/csuite/tiered_abort/main.c:402: DEADCODE 120712 At condition "durable_ahead_commit", the value of "durable_ahead_commit" must be equal to 0.
      /test/csuite/tiered_abort/main.c:401: DEADCODE 120712 The condition "durable_ahead_commit" cannot be true.
      /test/csuite/tiered_abort/main.c:401: DEADCODE 120712 Execution cannot reach the expression "active_ts + 4UL" inside this statement: "if (fprintf(fp, "%lu %lu %l...".

            Assignee:
            sue.loverso@mongodb.com Susan LoVerso
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: