test: fix a scan-build warning (value set but not read)
authorPeter Hutterer <peter.hutterer@who-t.net>
Sun, 22 Mar 2020 00:44:17 +0000 (10:44 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sun, 22 Mar 2020 00:44:17 +0000 (10:44 +1000)
This test pre-dates litest_assert_empty_queue(), so let's just use that

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/test-path.c

index 7e78dd47e880ba24007956eb48e17b7a6bb114d3..7649821470871343d4b9d1c7be75b698ac86c20c 100644 (file)
@@ -456,7 +456,6 @@ END_TEST
 START_TEST(path_add_invalid_path)
 {
        struct libinput *li;
-       struct libinput_event *event;
        struct libinput_device *device;
 
        li = litest_create_context();
@@ -468,8 +467,7 @@ START_TEST(path_add_invalid_path)
 
        libinput_dispatch(li);
 
-       while ((event = libinput_get_event(li)))
-               ck_abort();
+       litest_assert_empty_queue(li);
 
        libinput_unref(li);
 }