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

Coverity analysis defect 117572: Unsigned compared against 0

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • Query Execution 2021-03-08, Query Execution 2021-03-22, Query Execution 2021-04-05

    Description

      Unsigned compared against 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/db/exec/sbe/expressions/expression.cpp:420: NO_EFFECT 117572 This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "n >= 0UL".

      Attachments

        Activity

          People

            kyle.suarez@mongodb.com Kyle Suarez
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: