mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-16 04:35:13 +03:00
39 lines
2 KiB
Diff
39 lines
2 KiB
Diff
Without that we get overflow in conversion errors.
|
|
|
|
--- a/src/mumble/GlobalShortcut_unix.cpp
|
|
+++ b/src/mumble/GlobalShortcut_unix.cpp
|
|
@@ -332,7 +332,7 @@ void GlobalShortcutX::inputReadyRead(int) {
|
|
if (!found) {
|
|
int fd = f->handle();
|
|
int version = 0;
|
|
- if ((ioctl(fd, EVIOCGVERSION, &version) < 0) || (((version >> 16) & 0xFF) < 1)) {
|
|
+ if ((ioctl(fd, (int)EVIOCGVERSION, &version) < 0) || (((version >> 16) & 0xFF) < 1)) {
|
|
qWarning("GlobalShortcutX: Removing dead input device %s", qPrintable(f->fileName()));
|
|
qmInputDevices.remove(f->fileName());
|
|
qsKeyboards.remove(f->fileName());
|
|
@@ -362,20 +362,20 @@ void GlobalShortcutX::directoryChanged(const QString &dir) {
|
|
char name[256];
|
|
uint8_t events[EV_MAX / 8 + 1];
|
|
memset(events, 0, sizeof(events));
|
|
- if ((ioctl(fd, EVIOCGVERSION, &version) >= 0) && (ioctl(fd, EVIOCGNAME(sizeof(name)), name) >= 0)
|
|
- && (ioctl(fd, EVIOCGBIT(0, sizeof(events)), &events) >= 0) && test_bit(EV_KEY, events)
|
|
+ if ((ioctl(fd, (int)EVIOCGVERSION, &version) >= 0) && (ioctl(fd, (int)EVIOCGNAME(sizeof(name)), name) >= 0)
|
|
+ && (ioctl(fd, (int)EVIOCGBIT(0, sizeof(events)), &events) >= 0) && test_bit(EV_KEY, events)
|
|
&& (((version >> 16) & 0xFF) > 0)) {
|
|
name[255] = 0;
|
|
qWarning("GlobalShortcutX: %s: %s", qPrintable(f->fileName()), name);
|
|
// Is it grabbed by someone else?
|
|
- if ((ioctl(fd, EVIOCGRAB, 1) < 0)) {
|
|
+ if ((ioctl(fd, (int)EVIOCGRAB, 1) < 0)) {
|
|
qWarning("GlobalShortcutX: Device exclusively grabbed by someone else (X11 using "
|
|
"exclusive-mode evdev?)");
|
|
delete f;
|
|
} else {
|
|
- ioctl(fd, EVIOCGRAB, 0);
|
|
+ ioctl(fd, (int)EVIOCGRAB, 0);
|
|
uint8_t keys[KEY_MAX / 8 + 1];
|
|
- if ((ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keys)), &keys) >= 0) && test_bit(KEY_SPACE, keys))
|
|
+ if ((ioctl(fd, (int)EVIOCGBIT(EV_KEY, sizeof(keys)), &keys) >= 0) && test_bit(KEY_SPACE, keys))
|
|
qsKeyboards.insert(f->fileName());
|
|
|
|
fcntl(f->handle(), F_SETFL, O_NONBLOCK);
|