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

Remove dead code, uninitialized and unused variables in cache_resize cpp test

    • Storage Engines
    • 1
    • Storage Engines - 2022-06-27

      Uninitialized var prev_txn_id:

      CID 122319 (#1 of 1): Uninitialized scalar variable (UNINIT)
      uninit_use: Using uninitialized value prev_txn_id.
      213            } else if (prev_txn_id != tracked_txn_id) {
      

      Dead code:

         CID 122323 (#1 of 1): Logically dead code (DEADCODE)
      dead_error_line: Execution cannot reach this statement:
      212                first_record = false;
       

      Unused var:

      CID 122317 (#1 of 1): Unused value (UNUSED_VALUE)
      returned_value: Assigning value from std::stoull(std::string const(tracked_cache_size, std::allocator<char>()), NULL, 10) to cache_size here, but that stored value is not used.
      226            cache_size = std::stoull(tracked_cache_size);
      

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: