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

Coverity analysis defect 114136: Bitwise-and with zero

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Bitwise-and ('&') operation applied to zero always produces zero

      Defect 114136 (STATIC_C)
      Checker CONSTANT_EXPRESSION_RESULT (subcategory bit_and_with_zero)
      File: /src/btree/bt_discard.c
      Function __free_page_modify
      /src/btree/bt_discard.c, line: 147
      "page->flags_atomic & 0 /* (uint8_t)256U */" is always 0. This occurs when converting to bool for the operand of assignment.

              update_ignore = F_ISSET_ATOMIC(page, WT_PAGE_UPDATE_IGNORE);
      

            Assignee:
            haribabu.kommi@mongodb.com Haribabu Kommi
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: