Compile on PPC64 fails with error:
../common/evdev.c: In function 'evdev_revoke':
../common/evdev.c:26:26: error: overflow in conversion from 'long unsigned int' to 'int' changes value from '2147763601' to '-2147203695' [-Werror=overflow]
26 | return ioctl(fd, EVIOCREVOKE, NULL);
Prevent overflow warning by using explicit cast to int.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
common/evdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/evdev.c b/common/evdev.c
index 9a27578..90638f0 100644
--- a/common/evdev.c
+++ b/common/evdev.c
@@ -23,7 +23,7 @@ int path_is_evdev(const char *path) {
}
int evdev_revoke(int fd) {
- return ioctl(fd, EVIOCREVOKE, NULL);
+ return ioctl(fd, (int)EVIOCREVOKE, NULL);
}
#else
int path_is_evdev(const char *path) {
--
2.47.1