mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 21:40:05 +01:00
Fix some compiler warnings about maybe uninitialized values
These are just to shut the compiler up, in all three cases we only access the respective values if they're defined. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
9b924d26eb
commit
a29d7dba14
1 changed files with 3 additions and 3 deletions
|
|
@ -490,7 +490,7 @@ sync_state(struct libevdev *dev)
|
|||
*/
|
||||
|
||||
for (i = queue_num_elements(dev) - 1; i >= 0; i--) {
|
||||
struct input_event e;
|
||||
struct input_event e = {{0,0}, 0, 0, 0};
|
||||
queue_peek(dev, i, &e);
|
||||
if (e.type == EV_SYN)
|
||||
break;
|
||||
|
|
@ -1055,7 +1055,7 @@ libevdev_enable_event_code(struct libevdev *dev, unsigned int type,
|
|||
unsigned int code, const void *data)
|
||||
{
|
||||
unsigned int max;
|
||||
unsigned long *mask;
|
||||
unsigned long *mask = NULL;
|
||||
|
||||
if (libevdev_enable_event_type(dev, type))
|
||||
return -1;
|
||||
|
|
@ -1096,7 +1096,7 @@ int
|
|||
libevdev_disable_event_code(struct libevdev *dev, unsigned int type, unsigned int code)
|
||||
{
|
||||
unsigned int max;
|
||||
unsigned long *mask;
|
||||
unsigned long *mask = NULL;
|
||||
|
||||
if (type > EV_MAX)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue