[SERVER-73200] Coverity analysis defect 134909: Macro compares unsigned to 0 Created: 23/Jan/23  Updated: 29/Oct/23  Resolved: 15/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-72398 Coverity analysis defect 134417: Macr... Closed
Related
is related to SERVER-72398 Coverity analysis defect 134417: Macr... Closed
Assigned Teams:
Sharding NYC
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

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".



 Comments   
Comment by Githook User [ 15/Jun/23 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-73200 Remove invariant checking unsigned _inProgressReads >= 0
Branch: master
https://github.com/mongodb/mongo/commit/1612e110e6913cc4a229adfe607551246d8235dd

Generated at Thu Feb 08 06:23:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.