https://bugs.winehq.org/show_bug.cgi?id=38327
Bug ID: 38327 Summary: Uninitialized matrix Product: Wine Version: 1.7.39 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: isakov-sl@bk.ru Distribution: ---
I got warning ----- glsl_shader.c: In function ‘shader_glsl_load_constants’: glsl_shader.c:799: warning: ‘temp._44’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._44’ was declared here glsl_shader.c:799: warning: ‘temp._43’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._43’ was declared here glsl_shader.c:799: warning: ‘temp._42’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._42’ was declared here glsl_shader.c:799: warning: ‘temp._41’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._41’ was declared here glsl_shader.c:799: warning: ‘temp._34’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._34’ was declared here glsl_shader.c:799: warning: ‘temp._24’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._24’ was declared here glsl_shader.c:799: warning: ‘temp._14’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._14’ was declared here ---- this is a function --- /* Taken and adapted from Mesa. */ static BOOL invert_matrix_3d(struct wined3d_matrix *out, const struct wined3d_matrix *in) { float pos, neg, t, det; struct wined3d_matrix temp; ... *out = temp; --- The function is for matrix 3x3 while wined3d_matrix is 4x4. But local variable (temp) is not initialized and may contain arbitrary values. Should the matrix to be zeroed explicitly or there must be function to invert 4x4 matrix?