diff options
author | Jason Gerecke <jason.gerecke@wacom.com> | 2021-12-13 08:05:40 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-12-20 15:01:56 +1000 |
commit | f3a5474fbb073abc5d3a5a066e285ead9a3f5dd5 (patch) | |
tree | 0e1a8f924f978c8860f5e6bec8acb7767d9e1e5c | |
parent | 30e522a75206d7438063b2883feebbc622c21b69 (diff) | |
download | xf86-input-wacom-f3a5474fbb073abc5d3a5a066e285ead9a3f5dd5.tar.gz |
Disallow initalization of unknown device axis by wcmInitAxis
Addresses the following compile warning from GCC:
../src/x11/xf86Wacom.c: In function ‘wcmInitAxis’:
../src/x11/xf86Wacom.c:538:9: warning: ‘index’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
Attempting to initialize an unknown axis will now result in a program
abort. This copies the behavior used by the `convertAxes` function.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
-rw-r--r-- | src/x11/xf86Wacom.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/x11/xf86Wacom.c b/src/x11/xf86Wacom.c index b58db39..15ba64d 100644 --- a/src/x11/xf86Wacom.c +++ b/src/x11/xf86Wacom.c @@ -533,6 +533,8 @@ void wcmInitAxis(WacomDevicePtr priv, enum WacomAxisType type, case WACOM_AXIS_RING2: index = 6; break; + default: + abort(); } InitValuatorAxisStruct(pInfo->dev, index, |