[SERVER-29296] Warning in key_string.cpp due to unsafe mix of type 'uint64_t' and type 'bool' in operation '|' Created: 19/May/17  Updated: 30/Oct/23  Resolved: 19/May/17

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 3.5.7
Fix Version/s: 3.5.8

Type: Bug Priority: Trivial - P5
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-05-29
Participants:

 Description   

Shows only with the MSVC compiler:

src\mongo\db\storage\key_string.cpp(718): warning C4805: '|': unsafe mix of type 'uint64_t' and type 'bool' in operation



 Comments   
Comment by Kaloian Manassiev [ 19/May/17 ]

milkie, I think it might be because the compiler I use on my desktop is newer or that we disable some warnings. The same warning is not present in our Evergreen builds.

cc acm.

Comment by Githook User [ 19/May/17 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-29296 Fix warning in key_string.cpp
Branch: master
https://github.com/mongodb/mongo/commit/93d523217bc2fa5305b2fe180452d8d710b7a010

Comment by Eric Milkie [ 19/May/17 ]

Why does g++/clang not show this as a warning? (Or the UBSAN detector?)

Generated at Thu Feb 08 04:20:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.