[scintilla:bugs] #1978 Shifting signed 32-bit value by 31 bits is undefined behaviour

17 views
Skip to first unread message

Zufu Liu

unread,
Oct 14, 2017, 12:34:30 PM10/14/17
to scintill...@googlegroups.com

[bugs:#1978] Shifting signed 32-bit value by 31 bits is undefined behaviour

Status: open
Group: Bug
Created: Sat Oct 14, 2017 04:34 PM UTC by Zufu Liu
Last Updated: Sat Oct 14, 2017 04:34 PM UTC
Owner: nobody

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;

Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Neil Hodgson

unread,
Oct 14, 2017, 6:07:32 PM10/14/17
to scintill...@googlegroups.com
  • labels: --> scintilla
  • status: open --> open-fixed
  • assigned_to: Neil Hodgson
  • Comment:

Committed as [2db052].


[bugs:#1978] Shifting signed 32-bit value by 31 bits is undefined behaviour

Status: open-fixed
Group: Bug
Labels: scintilla

Created: Sat Oct 14, 2017 04:34 PM UTC by Zufu Liu
Last Updated: Sat Oct 14, 2017 04:34 PM UTC

Owner: Neil Hodgson

Neil Hodgson

unread,
Oct 25, 2017, 5:24:43 PM10/25/17
to scintill...@googlegroups.com
  • status: open-fixed --> closed-fixed

[bugs:#1978] Shifting signed 32-bit value by 31 bits is undefined behaviour

Status: closed-fixed
Group: Bug
Labels: scintilla

Created: Sat Oct 14, 2017 04:34 PM UTC by Zufu Liu

Last Updated: Sat Oct 14, 2017 10:07 PM UTC
Owner: Neil Hodgson

CppCheck 1.81 warnings:


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

Reply all
Reply to author
Forward
0 new messages