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

Clang warnings related to block_chunkcache

    • Type: Icon: Technical Debt Technical Debt
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.3.0, 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Engines
    • 2
    • 2024-01-09 - I Grew Tired

      Two warnings related to the block chunk cache from Clang analyzer:

      [2023/12/14 16:59:53.069] > 1 warning generated.
      [2023/12/14 16:59:53.069] > /data/mci/1aa3ceb4c1a38ff2bb3527414e756799/wiredtiger/src/block_cache/block_chunkcache.c:238:5: warning: Value stored to 'found' is never read
      [2023/12/14 16:59:53.069] >     found = false;
      [2023/12/14 16:59:53.069] >     ^       ~~~~~
      [2023/12/14 16:59:53.069] > /data/mci/1aa3ceb4c1a38ff2bb3527414e756799/wiredtiger/src/block_cache/block_chunkcache.c:1078:10: warning: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret'
      [2023/12/14 16:59:53.069] >     if ((ret = __wt_config_gets(session, cfg + 1, "chunk_cache", &cval)) == WT_NOTFOUND)
      [2023/12/14 16:59:53.069] >          ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [2023/12/14 16:59:53.069] > /data/mci/1aa3ceb4c1a38ff2bb3527414e756799/wiredtiger/src/block_cache/block_chunkcache.c:1177:9: warning: The left operand of '!=' is a garbage value
      [2023/12/14 16:59:53.069] >         __wt_free(session, newchunk);
      [2023/12/14 16:59:53.069] >         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      [2023/12/14 16:59:53.069] > /data/mci/1aa3ceb4c1a38ff2bb3527414e756799/wiredtiger/src/include/misc.h:144:27: note: expanded from macro '__wt_free'
      [2023/12/14 16:59:53.069] >         if (*(void **)__p != NULL)       \
      

            Assignee:
            siddhartha.mahajan@mongodb.com Sid Mahajan
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: