1From 1e48821ba109b00e9c2931f12aa206c4ef54fd71 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 24 Apr 2017 12:34:55 -0700
4Subject: [PATCH] libgeis: Compare the first character of string to null
5
6gcc7 wants to be specific when it comes to comparing characters
7and strings
8
9fixes
10
11| ../../../../../../../workspace/sources/geis/libgeis/geis_v1.c: In function '_v1_subscribe_device':
12| ../../../../../../../workspace/sources/geis/libgeis/geis_v1.c:613:20: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16Upstream-Status: Pending
17
18 libgeis/geis_v1.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/libgeis/geis_v1.c b/libgeis/geis_v1.c
22index 67045ee..07c0851 100644
23--- a/libgeis/geis_v1.c
24+++ b/libgeis/geis_v1.c
25@@ -610,7 +610,7 @@ _v1_subscribe_device(GeisInstance instance,
26                      const char **gesture_list)
27 {
28   GeisStatus result = GEIS_UNKNOWN_ERROR;
29-  if (gesture_list == GEIS_ALL_GESTURES)
30+  if (gesture_list[0][0] == GEIS_ALL_GESTURES)
31   {
32     geis_debug("subscribing device %d for all gestures", device_id);
33   }
34@@ -757,7 +757,7 @@ geis_unsubscribe(GeisInstance     instance,
35                  GeisGestureType *gesture_list)
36 {
37   GeisStatus status = GEIS_STATUS_NOT_SUPPORTED;
38-  if (gesture_list == GEIS_ALL_GESTURES)
39+  if (gesture_list[0] == GEIS_ALL_GESTURES)
40   {
41     status = geis_subscription_deactivate(instance->subscription);
42   }
43--
442.12.2
45
46