mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 17:00:07 +01:00
doc: fix uinput device creation warnings
The example code for creating uinput devices produces the following warnings: warning: unused variable ‘ev’ [-Wunused-variable] | struct input_event ev[2]; | ^~ warning: unused variable ‘new_fd’ [-Wunused-variable] | int fd, new_fd, uifd; | ^~~~~~ warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized] | return err; | ^~~ Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
9b918d316a
commit
8a4f45df5b
1 changed files with 2 additions and 3 deletions
|
|
@ -42,14 +42,13 @@ struct libevdev_uinput;
|
|||
*
|
||||
* @code
|
||||
* int err;
|
||||
* int fd, new_fd, uifd;
|
||||
* int fd, uifd;
|
||||
* struct libevdev *dev;
|
||||
* struct libevdev_uinput *uidev;
|
||||
* struct input_event ev[2];
|
||||
*
|
||||
* fd = open("/dev/input/event0", O_RDONLY);
|
||||
* if (fd < 0)
|
||||
* return err;
|
||||
* return -errno;
|
||||
*
|
||||
* err = libevdev_new_from_fd(fd, &dev);
|
||||
* if (err != 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue