Menu

#1978 Shifting signed 32-bit value by 31 bits is undefined behaviour

Bug
closed-fixed
scintilla (610)
5
2017-10-25
2017-10-14
Zufu Liu
No

CppCheck 1.81 warnings:
Shifting signed 32-bit value by 31 bits is undefined behaviour.

for ViewStyle.cxx line 195:

const int maskBit = 1 << markBit;

a quick fix would be:

const int maskBit = 1U << markBit;

Discussion

  • Neil Hodgson

    Neil Hodgson - 2017-10-14
    • labels: --> scintilla
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Neil Hodgson

    Neil Hodgson - 2017-10-14

    Committed as [2db052].

     

    Related

    Commit: [2db052]

  • Neil Hodgson

    Neil Hodgson - 2017-10-25
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB