From: Peter Hutterer Date: Thu, 3 Jul 2014 01:00:54 +0000 (+1000) Subject: test: fix compiler warnings for comparison int vs unsigned int X-Git-Tag: 0.5.0~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5cecefeea050642355fd35f39f46b5aa7ee304c5;p=platform%2Fupstream%2Flibinput.git test: fix compiler warnings for comparison int vs unsigned int Signed-off-by: Peter Hutterer --- diff --git a/test/litest.c b/test/litest.c index 02f3d77b..5fd9e913 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 e467a5c2..30b8d452 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 7d5668f8..8f1ab1fe 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 3e5ee202..d7625e92 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;