[PATCH libevdev 3/3] uinput: explicitly ignore the UI_DEV_DESTROY return value

David Herrmann dh.herrmann at gmail.com
Fri Aug 22 08:00:19 PDT 2014


Hi

On Fri, Aug 22, 2014 at 4:56 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> This can't fail in the kernel anyway, so cast it to shut up coverity.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  libevdev/libevdev-uinput.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libevdev/libevdev-uinput.c b/libevdev/libevdev-uinput.c
> index ea2b025..33b5317 100644
> --- a/libevdev/libevdev-uinput.c
> +++ b/libevdev/libevdev-uinput.c
> @@ -358,7 +358,7 @@ libevdev_uinput_destroy(struct libevdev_uinput *uinput_dev)
>         if (!uinput_dev)
>                 return;
>
> -       ioctl(uinput_dev->fd, UI_DEV_DESTROY, NULL);
> +       (void)ioctl(uinput_dev->fd, UI_DEV_DESTROY, NULL);

iuhh... coverity shouldn't warn about ignored return values! This
looks really ugly.. But sure, go ahead, I don't care that much.

Thanks
David

>         if (uinput_dev->fd_is_managed)
>                 close(uinput_dev->fd);
>         free(uinput_dev->syspath);
> --
> 1.9.3
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list