tools: fix signed/unsigned comparison warnings

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2016-12-05 20:31:31 +10:00
parent 6e1db369ee
commit 952b562d0c
3 changed files with 7 additions and 6 deletions

View file

@ -896,7 +896,7 @@ tp_tap_config_count(struct libinput_device *device)
dispatch = ((struct evdev_device *) device)->dispatch;
tp = container_of(dispatch, tp, base);
return min(tp->ntouches, 3); /* we only do up to 3 finger tap */
return min(tp->ntouches, 3U); /* we only do up to 3 finger tap */
}
static enum libinput_config_status

View file

@ -242,7 +242,8 @@ static inline void
draw_tablet(struct window *w, cairo_t *cr)
{
double x, y;
int first, last, mask;
int first, last;
size_t mask;
int i;
/* tablet tool, square for prox-in location */
@ -485,7 +486,7 @@ handle_event_device_notify(struct libinput_event *ev)
struct libinput *li;
struct window *w;
const char *type;
int i;
size_t i;
if (libinput_event_get_type(ev) == LIBINPUT_EVENT_DEVICE_ADDED)
type = "added";

View file

@ -469,7 +469,7 @@ tools_device_apply_config(struct libinput_device *device,
{
if (options->tapping != -1)
libinput_device_config_tap_set_enabled(device, options->tapping);
if (options->tap_map != -1)
if (options->tap_map != (enum libinput_config_tap_button_map)-1)
libinput_device_config_tap_set_button_map(device,
options->tap_map);
if (options->drag != -1)
@ -490,10 +490,10 @@ tools_device_apply_config(struct libinput_device *device,
if (options->dwt != -1)
libinput_device_config_dwt_set_enabled(device, options->dwt);
if (options->click_method != -1)
if (options->click_method != (enum libinput_config_click_method)-1)
libinput_device_config_click_set_method(device, options->click_method);
if (options->scroll_method != -1)
if (options->scroll_method != (enum libinput_config_scroll_method)-1)
libinput_device_config_scroll_set_method(device,
options->scroll_method);
if (options->scroll_button != -1)