mirror of
https://git.busybox.net/busybox.git
synced 2024-11-27 15:43:26 +08:00
read_key(): placate "warning: shifting a negative signed value is undefined"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
d6ff27de15
commit
f39a71817e
@ -259,7 +259,8 @@ int64_t FAST_FUNC read_key(int fd, char *buffer, int timeout)
|
||||
|
||||
buffer[-1] = 0;
|
||||
/* Pack into "1 <row15bits> <col16bits>" 32-bit sequence */
|
||||
col |= (((-1 << 15) | row) << 16);
|
||||
row |= ((unsigned)(-1) << 15);
|
||||
col |= (row << 16);
|
||||
/* Return it in high-order word */
|
||||
return ((int64_t) col << 32) | (uint32_t)KEYCODE_CURSOR_POS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user