[SERVER-65476] Coverity analysis defect 122072: Macro compares unsigned to 0 Created: 12/Apr/22  Updated: 29/Oct/23  Resolved: 25/Apr/22

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

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-04-12 at 8.54.23 AM.png    
Issue Links:
Related
related to SERVER-65207 Coverity analysis defect 122015: Argu... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2022-05-02
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/fle_crud.cpp:1159: NO_EFFECT 122072 This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "docCount >= 0UL".



 Comments   
Comment by Githook User [ 22/Apr/22 ]

Author:

{'name': 'Mark Benvenuto', 'email': 'mark.benvenuto@mongodb.com', 'username': 'markbenvenuto'}

Message: SERVER-65476 Coverity analysis defect 122072: Macro compares unsigned to 0
Branch: master
https://github.com/mongodb/mongo/commit/7c8c27650698e807ca8c885fb2a0e0d2996ecd19

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