Opened 8 years ago
Closed 8 years ago
#12991 closed bug (fixed)
[Patch] KeyboardInputDevice.cpp: Fix int-in-bool-context warning
Reported by: | mt | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Servers/input_server | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Gcc7 reports "-Werror=int-in-bool-context" at line 343. Since "1 << (7 - (keycode & 0x7)" is always > 0 (true), I think it would be better to use bitwise NOT than logical NOT.
/home/haiku/haiku/haiku/src/add-ons/input_server/devices/keyboard/KeyboardInputDevice.cpp:343:36: error: << in boolean context, did you mean '<' ? [-Werror=int-in-bool-context] states[(keycode) >> 3] &= (!(1 << (7 - (keycode & 0x7)))); ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Attachments (1)
Change History (3)
by , 8 years ago
Attachment: | 0033-KeyboardInputDevice.cpp-Fix-int-in-bool-context-warn.patch added |
---|
comment:1 by , 8 years ago
patch: | 0 → 1 |
---|
comment:2 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Applied in hrev50585.