Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-75883

Coverity analysis defect 137567: Macro compares unsigned to 0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0, 7.0.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • ALL
    • v7.0
    • QE 2023-05-01

      Macro compares unsigned to 0

      An unsigned value can never be negative, so this test will always evaluate the same way. An unsigned value can never be less than 0
      /src/mongo/util/indexed_string_vector.h:139: NO_EFFECT 137567 This less-than-zero comparison of an unsigned value is never true. "encodedIdx < 0UL".

            Assignee:
            andrew.paroski@mongodb.com Drew Paroski
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: