[PATCH libevdev 2/2] test: remove test for ULONG_MAX queue allocation

Peter Hutterer peter.hutterer at who-t.net
Tue May 9 03:45:21 UTC 2017


Fixes the warning:
../libevdev/libevdev-int.h:231:15: warning: argument 1 value
‘18446744073709551615’ exceeds maximum object size 9223372036854775807
[-Walloc-size-larger-than=]

That's now part of gcc's -Wall, so let's rely on that for code. Arguably, the
queue code is simple enough that we don't need a test for ENOMEM anyway.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 test/test-int-queue.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/test/test-int-queue.c b/test/test-int-queue.c
index 501dc08..c23f96f 100644
--- a/test/test-int-queue.c
+++ b/test/test-int-queue.c
@@ -33,9 +33,6 @@ START_TEST(test_queue_alloc)
 	rc = queue_alloc(&dev, 0);
 	ck_assert_int_eq(rc, -ENOMEM);
 
-	rc = queue_alloc(&dev, ULONG_MAX);
-	ck_assert_int_eq(rc, -ENOMEM);
-
 	rc = queue_alloc(&dev, 100);
 	ck_assert_int_eq(rc, 0);
 
-- 
2.12.2



More information about the Input-tools mailing list