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

Benjamin Tissoires benjamin.tissoires at gmail.com
Tue May 9 09:03:04 UTC 2017


On Tue, May 9, 2017 at 5:45 AM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> 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>
> ---

Hi Peter,
both are:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires at gmail.com>

Cheers,
Benjamin

>  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
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list