Closed Bug 1182370 Opened 9 years ago Closed 9 years ago

_BitScanReverse does not modify `*pIndex` if input is zero

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

Details

Attachments

(1 file)

MSVC code analysis complains about this.

https://msdn.microsoft.com/en-us/library/fbxyd7zd.aspx

_BitScanReverse doesn't modify `*pIndex` is the input is all zeros. We need to either test for this before-hand, or test the retval from _BitScanReverse, which is zero if input is zero. (non-zero otherwise)
Attachment #8631949 - Flags: review?(jwalden+bmo)
Attachment #8631949 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/5b4a4d8e5a80
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: