[SERVER-54305] Coverity analysis defect 117572: Unsigned compared against 0 Created: 04/Feb/21  Updated: 29/Oct/23  Resolved: 25/Mar/21

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

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

Issue Links:
Duplicate
is duplicated by SERVER-54306 Coverity analysis defect 117573: Unsi... Closed
is duplicated by SERVER-54307 Coverity analysis defect 117575: Unsi... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query Execution 2021-03-08, Query Execution 2021-03-22, Query Execution 2021-04-05
Participants:

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



 Comments   
Comment by Githook User [ 25/Mar/21 ]

Author:

{'name': 'Kyle Suarez', 'email': 'kyle.suarez@mongodb.com'}

Message: SERVER-54305 remove unsigned comparison against 0
Branch: master
https://github.com/mongodb/mongo/commit/834a189f3969c23f187d2346347a8d760b50e928

Generated at Thu Feb 08 05:33:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.