../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 <[email protected]>
---
 dix/getevents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dix/getevents.c b/dix/getevents.c
index 0d87453e5d..d8955969ab 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);
-- 
2.16.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to