test: fix compiler warnings for comparison int vs unsigned int
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 3 Jul 2014 01:00:54 +0000 (11:00 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 3 Jul 2014 01:17:49 +0000 (11:17 +1000)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c
test/misc.c
test/pointer.c
test/touchpad.c

index 02f3d77bdcae3de91ecb27c2c645d77d8dc368c5..5fd9e913873737a0d352109b8bb27646e43d91f6 100644 (file)
@@ -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)
index e467a5c22d4a257fd5d38ccca44a983ab3b8b9e0..30b8d452dcffed29b4c96d5ad528a2abc3d9fba8 100644 (file)
@@ -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);
index 7d5668f86fe6ad459af6980e329054ead615445c..8f1ab1fe571c49d55e31836298de9bcf16d413f0 100644 (file)
@@ -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;
index 3e5ee202a3cb4fbdd0be3b4a2357bda011e0c4d6..d7625e928c22e95fe1ae71c544ebeb711f1206f9 100644 (file)
@@ -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;