summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2017-12-15 13:12:28 -0800
committerJason Gerecke <killertofu@gmail.com>2017-12-15 13:33:13 -0800
commitce72a0048b56089f3946f9bc90163fcad7222f86 (patch)
tree544ffcc8ac4ae35509a1d46fe41deab95e0847cc
parent2fa4ef48c98860859d48810d870567fe99b5d76f (diff)
downloadxf86-input-wacom-ce72a0048b56089f3946f9bc90163fcad7222f86.tar.gz
Move 'suppress' variable from wcmEvent to commonDispatchDevice
Resolves the following compile-time warning: ../src/wcmCommon.c: In function ‘wcmEvent’: ../src/wcmCommon.c:1007:23: error: ‘suppress’ may be used uninitialized in this function [-Werror=maybe-uninitialized] commonDispatchDevice(pInfo, pChannel, suppress); ^ Fixes: 2fa4ef48c9 ("Do not overwrite raw device state with filtered coordinate values") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
-rw-r--r--src/wcmCommon.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 900544b..bd5039c 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -56,8 +56,7 @@ static int *VCOPY(const int *valuators, int nvals)
static int applyPressureCurve(WacomDevicePtr pDev, const WacomDeviceStatePtr pState);
static void commonDispatchDevice(InputInfoPtr pInfo,
- const WacomChannelPtr pChannel,
- enum WacomSuppressMode suppress);
+ const WacomChannelPtr pChannel);
static void sendAButton(InputInfoPtr pInfo, int button, int mask,
int first_val, int num_vals, int *valuators);
@@ -899,7 +898,6 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
{
WacomDeviceState ds;
WacomChannelPtr pChannel;
- enum WacomSuppressMode suppress;
InputInfoPtr pInfo;
WacomToolPtr tool;
WacomDevicePtr priv;
@@ -1004,7 +1002,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
/* For touch, only first finger moves the cursor */
if ((common->wcmTouch && ds.device_type == TOUCH_ID && ds.serial_num == 1) ||
(ds.device_type != TOUCH_ID))
- commonDispatchDevice(pInfo, pChannel, suppress);
+ commonDispatchDevice(pInfo, pChannel);
}
@@ -1151,13 +1149,13 @@ static void detectPressureIssue(WacomDevicePtr priv,
}
static void commonDispatchDevice(InputInfoPtr pInfo,
- const WacomChannelPtr pChannel,
- enum WacomSuppressMode suppress)
+ const WacomChannelPtr pChannel)
{
WacomDeviceState* ds = &pChannel->valid.states[0];
WacomDevicePtr priv = pInfo->private;
WacomCommonPtr common = priv->common;
WacomDeviceState filtered;
+ enum WacomSuppressMode suppress;
int raw_pressure = 0;
/* device_type should have been retrieved and set in the respective