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

Coverity analysis defect 99665: Redundant test

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.0, 3.2.10, 3.3.11
    • Affects Version/s: None
    • Component/s: None

      Test always evaluates the same

      Defect 99665 (STATIC_C)
      Checker DEADCODE (subcategory redundant_test)
      File: /src/third_party/wiredtiger/src/block/block_ext.c
      Function __block_extlist_dump
      /src/third_party/wiredtiger/src/block/block_ext.c, line: 1448
      Condition "(ret = __wt_verbose(session, 2, "%s extent list %s, %u entries, %s bytes", tag, el->name, el->entries, __wt_buf_set_size(session, el->bytes, true, t1))) != 0", taking false branch. Now the value of "ret" is equal to 0.

          		WT_ERR(__wt_verbose(session, WT_VERB_BLOCK,
      

      /src/third_party/wiredtiger/src/block/block_ext.c, line: 1443
      Condition "(ret = __wt_msg(session, "%s extent list %s, %u entries, %s bytes", tag, el->name, el->entries, __wt_buf_set_size(session, el->bytes, true, t1))) != 0", taking false branch. Now the value of "ret" is equal to 0.

          		WT_ERR(__wt_msg(session,
      

      /src/third_party/wiredtiger/src/block/block_ext.c, line: 1453
      At condition "ret != 0", the value of "ret" must be equal to 0.

          	if (ret != 0 || el->entries == 0)
      

      /src/third_party/wiredtiger/src/block/block_ext.c, line: 1453
      The condition "ret != 0" cannot be true.

          	if (ret != 0 || el->entries == 0)
      

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: