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

Coverity analysis defect 134909: Macro compares unsigned to 0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Sharding NYC
    • Fully Compatible
    • ALL

      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/db/s/migration_chunk_cloner_source.cpp:1381: NO_EFFECT 134909 This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "this->_inProgressReads >= 0UL".

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: