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

Fix unused variables in search near cpp tests

    • 2
    • Storage - Ra 2021-10-04, Storage - Ra 2021-10-18

      Three issues have been detected in the search_near_01.cxx test:

      Parse warning (ID: 120809)

      A parse warning may reduce the maintainability of the code, or it may indicate a serious error. A parse warning from the Coverity parser may indicate a bug or poor coding practice
      /test/cppsuite/tests/search_near_01.cxx:58: PW.DECLARED_BUT_NOT_REFERENCED 120809 variable "cmpp" was declared but never referenced

      Unchecked return value (ID: 120810 and 120811)
      If the function returns an error value, the error value may be mistaken for a normal value.

      In search_near_01::​read_operation(test_harness::​thread_context *): Value returned from a function is not checked for errors before being used.

      Calling commit without checking return value (as is done elsewhere 4 out of 8 times).

      One issue has been detected in the search_near_02.cxx test:

      Parse warning (ID: 120816)

      declared_but_not_referenced: variable "ret" was declared but never referenced /test/cppsuite/tests/search_near_02.cxx:270.

            Assignee:
            jie.chen@mongodb.com Jie Chen
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: