struct evdev_dispatch *dispatch;
dispatch = device->dispatch;
+ evdev_device_free_aux_data(device);
if (dispatch)
dispatch->interface->destroy(dispatch);
libinput_seat_unref(device->base.seat);
libevdev_free(device->evdev);
udev_device_unref(device->udev_device);
- evdev_device_free_aux_data(device);
free(device);
}
CASE_RETURN_STRING(LIBINPUT_EVENT_SWITCH_TOGGLE);
case LIBINPUT_EVENT_NONE:
abort();
+ default:
+ break;
}
return NULL;
break;
case LIBINPUT_EVENT_TOUCH_AUX_DATA:
return (struct libinput_event_touch_aux_data *) event;
+ default:
+ break;
}
return NULL;
return false;
}
-/**
- * Return the next word in a string pointed to by state before the first
- * separator character. Call repeatedly to tokenize a whole string.
- *
- * @param state Current state
- * @param len String length of the word returned
- * @param separators List of separator characters
- *
- * @return The first word in *state, NOT null-terminated
- */
-static const char *
-next_word(const char **state, size_t *len, const char *separators)
-{
- const char *next = *state;
- size_t l;
-
- if (!*next)
- return NULL;
-
- next += strspn(next, separators);
- if (!*next) {
- *state = next;
- return NULL;
- }
-
- l = strcspn(next, separators);
- *state = next + l;
- *len = l;
-
- return next;
-}
-
static int
device_added(struct udev_device *udev_device,
struct udev_input *input,