summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2018-04-05 13:09:38 -0400
committerAdam Jackson <ajax@redhat.com>2018-04-05 14:18:52 -0400
commit6f0903ddc905f44272b85942323a467d82fef644 (patch)
tree11dd40dab0210ecafd2e2415dd88d866b89acd96
parent57e872301f5e836be2efb8f952f9c9711650b447 (diff)
dix: Hush an almost certainly bogus warning
../dix/getevents.c: In function ‘transformAbsolute’: ../dix/getevents.c:1195:28: warning: ‘oy’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct pixman_f_vector p = {.v = {*x, *y, 1} }; ^ ../dix/getevents.c:1234:22: note: ‘oy’ was declared here double x, y, ox, oy; ^~ This one is truly special. Even though both ox and oy are set and read along the same paths, only oy is marked for this warning! Initializing just oy = 0.0 fixes it entirely, but let's not make a weird thing weirder. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
-rw-r--r--dix/getevents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 0d87453e5..d8955969a 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1231,7 +1231,7 @@ transformRelative(DeviceIntPtr dev, ValuatorMask *mask)
static void
transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
{
- double x, y, ox, oy;
+ double x, y, ox = 0.0, oy = 0.0;
int has_x, has_y;
has_x = valuator_mask_isset(mask, 0);