[SERVER-71295] Coverity analysis defect 134118: Macro compares unsigned to 0 Created: 13/Nov/22  Updated: 29/Oct/23  Resolved: 16/Nov/22

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

Type: Bug Priority: Major - P3
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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2022-11-28
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/crypto/fle_crypto.cpp:3546: NO_EFFECT 134118 This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "precision.get() >= 0U".



 Comments   
Comment by Githook User [ 15/Nov/22 ]

Author:

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

Message: SERVER-71295 Coverity analysis defect 134118: Macro compares unsigned to 0
Branch: master
https://github.com/mongodb/mongo/commit/6bb979af9a37a1e4523b7553e51b9c02129a973a

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