From 5cecefeea050642355fd35f39f46b5aa7ee304c5 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 3 Jul 2014 11:00:54 +1000 Subject: [PATCH] test: fix compiler warnings for comparison int vs unsigned int Signed-off-by: Peter Hutterer --- test/litest.c | 4 ++-- test/misc.c | 2 +- test/pointer.c | 2 +- test/touchpad.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/litest.c b/test/litest.c index 02f3d77..5fd9e91 100644 --- a/test/litest.c +++ b/test/litest.c @@ -357,7 +357,7 @@ merge_absinfo(const struct input_absinfo *orig, const struct input_absinfo *override) { struct input_absinfo *abs; - int nelem, i; + unsigned int nelem, i; size_t sz = ABS_MAX + 1; if (!orig) @@ -391,7 +391,7 @@ static int* merge_events(const int *orig, const int *override) { int *events; - int nelem, i; + unsigned int nelem, i; size_t sz = KEY_MAX * 3; if (!orig) diff --git a/test/misc.c b/test/misc.c index e467a5c..30b8d45 100644 --- a/test/misc.c +++ b/test/misc.c @@ -394,7 +394,7 @@ START_TEST(device_ids) { struct litest_device *dev = litest_current_device(); const char *name; - int pid, vid; + unsigned int pid, vid; name = libevdev_get_name(dev->evdev); pid = libevdev_get_id_product(dev->evdev); diff --git a/test/pointer.c b/test/pointer.c index 7d5668f..8f1ab1f 100644 --- a/test/pointer.c +++ b/test/pointer.c @@ -102,7 +102,7 @@ START_TEST(pointer_motion_relative) END_TEST static void -test_button_event(struct litest_device *dev, int button, int state) +test_button_event(struct litest_device *dev, unsigned int button, int state) { struct libinput *li = dev->libinput; struct libinput_event *event; diff --git a/test/touchpad.c b/test/touchpad.c index 3e5ee20..d7625e9 100644 --- a/test/touchpad.c +++ b/test/touchpad.c @@ -90,7 +90,7 @@ START_TEST(touchpad_2fg_no_motion) END_TEST static void -assert_button_event(struct libinput *li, int button, +assert_button_event(struct libinput *li, unsigned int button, enum libinput_button_state state) { struct libinput_event *event; @@ -1127,7 +1127,7 @@ test_2fg_scroll(struct litest_device *dev, int dx, int dy, int sleep) } static void -check_2fg_scroll(struct litest_device *dev, int axis, int dir) +check_2fg_scroll(struct litest_device *dev, unsigned int axis, int dir) { struct libinput *li = dev->libinput; struct libinput_event *event, *next_event; -- 2.7.4