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

Coverity analysis defect 99665: Redundant test

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0, 3.3.11, 3.2.10
    • Labels:

      Description

      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)

        Attachments

          Activity

            People

            • Assignee:
              keith.bostic Keith Bostic
              Reporter:
              xgen-internal-coverity Coverity Collector User
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: