From 7d898e638abad8267420f8c0d827d21f716b8977 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 1 Aug 2019 14:07:00 +0200 Subject: fix clang warnings --- proto-libevdev/ftnoir_protocol_libevdev.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'proto-libevdev') 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); } -- cgit v1.2.3