From 30c60ed57838f911a467f3e71e6e9c269fc91a60 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 7 May 2025 15:04:19 +0200 Subject: [PATCH] xfree86: modes: fix uninitialized variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit | ../hw/xfree86/modes/xf86RandR12.c: In function ‘xf86ComputeCrtcPan’: | ../hw/xfree86/modes/xf86RandR12.c:310:54: warning: use of uninitialized value ‘r[1]’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] | 310 | q[i] = m->m[1][i] * r[0] - m->m[0][i] * r[1]; | | ~^~~ Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xfree86/modes/xf86RandR12.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 92c5570a8..ac41d586f 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -295,10 +295,10 @@ xf86ComputeCrtcPan(Bool transform_in_use, * dy = (F T0 - Q0) / U0 * dy = (F P0 - V0) / W0 */ - double r[3]; - double q[2], u[2], t[2], v[2], w[2], p[2]; + double r[3] = { 0 }; + double q[2], u[2], t[2], v[2], w[2] = { 0 }, p[2]; double f; - struct pixman_f_vector d; + struct pixman_f_vector d = { 0 }; int i; /* Get the un-normalized crtc coordinates again */