fix build warnings sandbox/upgrade/efl120 accepted/tizen/unified/20171110.070821 submit/tizen/20171107.103302 submit/tizen/20171110.012855
authorJengHyun Kang <jhyuni.kang@samsung.com>
Wed, 25 Oct 2017 08:02:39 +0000 (17:02 +0900)
committerJengHyun Kang <jhyuni.kang@samsung.com>
Wed, 25 Oct 2017 08:02:39 +0000 (17:02 +0900)
src/evdev-lid.c
src/evdev-tablet-pad.c
src/evdev.c
src/libinput.c
src/udev-seat.c
tools/Makefile.am

index fe98e6e117ff9059bcebdbf7e0307c769e02d47c..150ca4226b10b189ebf4071c59641c7bbad330d3 100644 (file)
@@ -70,6 +70,7 @@ lid_switch_keyboard_event(uint64_t time,
                          void *data)
 {
        struct lid_switch_dispatch *dispatch = lid_dispatch(data);
+       unsigned int temp;
 
        if (!dispatch->lid_is_closed)
                return;
@@ -84,7 +85,8 @@ lid_switch_keyboard_event(uint64_t time,
                        {{ 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. */
        }
index 2b8c1422ab6ddfe2188cb0fcb962e7fe450bd6bb..0131dfc10be4c3175e58cf13e9bb82303d2fa60d 100644 (file)
@@ -374,7 +374,7 @@ pad_notify_button_mask(struct pad_dispatch *pad,
                                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);
index 018fba1ebbe4a150f5e18e710a1a3da205296005..3fc85f099c1ee450889b5fd398e2b5febc78da89 100644 (file)
@@ -2820,14 +2820,14 @@ evdev_configure_device(struct evdev_device *device)
                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;
                        }
@@ -3728,6 +3728,7 @@ evdev_device_destroy(struct evdev_device *device)
        struct evdev_dispatch *dispatch;
 
        dispatch = device->dispatch;
+       evdev_device_free_aux_data(device);
        if (dispatch)
                dispatch->interface->destroy(dispatch);
 
@@ -3739,7 +3740,6 @@ evdev_device_destroy(struct evdev_device *device)
        libinput_seat_unref(device->base.seat);
        libevdev_free(device->evdev);
        udev_device_unref(device->udev_device);
-       evdev_device_free_aux_data(device);
        free(device);
 }
 
@@ -3841,6 +3841,8 @@ evdev_device_free_aux_data(struct evdev_device *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++) {
index 5013615accbdcc1cfdfede3260438ed7ce4fd902..565c96ab6449a8b3b0d949040f376ff80bebbd01 100644 (file)
@@ -141,6 +141,8 @@ event_type_to_str(enum libinput_event_type type)
        CASE_RETURN_STRING(LIBINPUT_EVENT_SWITCH_TOGGLE);
        case LIBINPUT_EVENT_NONE:
                abort();
+       default:
+               break;
        }
 
        return NULL;
@@ -1895,6 +1897,8 @@ libinput_event_get_touch_aux_data(struct libinput_event *event)
                break;
        case LIBINPUT_EVENT_TOUCH_AUX_DATA:
                return (struct libinput_event_touch_aux_data *) event;
+       default:
+               break;
        }
 
        return NULL;
index c4bb241786785592a50e4fc5ccd9f8659a1558d8..4878c3cfb903208e84f064c2793e8f33f8c2ccb5 100644 (file)
@@ -63,38 +63,6 @@ libinput_path_has_device(struct libinput *libinput, const char *devnode)
        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,
index 07cd614a9c9418d4e7e6ab80d1fd6f61a8e1bf8e..ff3967084051df19956d1f38e707ff3abef9cde4 100644 (file)
@@ -74,7 +74,7 @@ uninstall-local:
        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)