summaryrefslogtreecommitdiffhomepage
path: root/proto-libevdev
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-08-01 14:07:00 +0200
commit7d898e638abad8267420f8c0d827d21f716b8977 (patch)
tree897a31950ba0a345f05162e4e8616f26e1b69446 /proto-libevdev
parentb930dd608bf95ecc3f89007313ba8ab8b1935ee5 (diff)
fix clang warnings
Diffstat (limited to 'proto-libevdev')
-rw-r--r--proto-libevdev/ftnoir_protocol_libevdev.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/proto-libevdev/ftnoir_protocol_libevdev.cpp b/proto-libevdev/ftnoir_protocol_libevdev.cpp
index 612f5b27..72c05dc5 100644
--- a/proto-libevdev/ftnoir_protocol_libevdev.cpp
+++ b/proto-libevdev/ftnoir_protocol_libevdev.cpp
@@ -1,4 +1,10 @@
// strerror_r(3)
+
+#ifdef __clang__
+# pragma clang diagnostic ignored "-Wreserved-id-macro"
+# pragma clang diagnostic ignored "-Wunused-macros"
+#endif
+
#ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200112L
#endif
@@ -113,7 +119,7 @@ void evdev::pose(const double* headpose) {
for (int i = 0; i < 6; i++)
{
- int value = headpose[i] * mid_input / max_value[i] + mid_input;
+ int value = (int)(headpose[i] * mid_input / max_value[i] + mid_input);
int normalized = clamp(value, min_input, max_input);
(void) libevdev_uinput_write_event(uidev, EV_ABS, axes[i], normalized);
}