void *data)
{
struct lid_switch_dispatch *dispatch = lid_dispatch(data);
+ unsigned int temp;
if (!dispatch->lid_is_closed)
return;
{{ 0, 0 }, EV_SYN, SYN_REPORT, 0 },
};
- (void)write(fd, ev, sizeof(ev));
+ temp = write(fd, ev, sizeof(ev));
+ (void)temp;
/* In case write() fails, we sync the lid state manually
* regardless. */
}
continue;
map = pad->button_map[code - 1];
- if (map != -1) {
+ if (map != (char)-1) {
group = pad_button_get_mode_group(pad, map);
pad_button_update_mode(group, map, state);
tablet_pad_notify_button(base, time, map, state, group);
env = getenv("LIBINPUT_IGNORE_JOYSTICK");
if (env && atoi(env) == 1) {
evdev_log_info(device,
- "input device '%s', have joystick, ignoring\n",
+ "input device '%s' have joystick, ignoring\n",
device->devname);
return NULL;
}
else {
if ((udev_tags & EVDEV_UDEV_TAG_JOYSTICK) == udev_tags) {
evdev_log_info(device,
- "input device '%s', %s is a joystick, ignoring\n",
+ "input device '%s' is a joystick, ignoring\n",
device->devname);
return NULL;
}
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);
}
struct fallback_dispatch *dispatch;
struct mt_aux_data *aux_data, *aux_data_tmp;
+ if (!device || !device->dispatch) return;
+
dispatch = fallback_dispatch(device->dispatch);
for (i = 0; i < (int)dispatch->mt.slots_len; i++) {
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,
rm -f $(DESTDIR)$(bindir)/libinput-debug-events
SUFFIXES = .man
-.man.1:
+.man.1:
$(AM_V_GEN)$(SED) -e 's|\@LIBINPUT_VERSION\@|$(PACKAGE_VERSION)|' < $< > $@
CLEANFILES = *.1
EXTRA_DIST += $(dist_man1_MANS:.1=.man)