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

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

    XMLWordPrintable

    Details

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

      Description

      '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...".

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: