From: Jiri Palecek Date: Thu, 11 Jan 2024 22:25:18 +0000 (+0100) Subject: Fix uninitialized variable warning X-Git-Tag: archive/raspbian/4%5.27.10-1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=47964d441c5f828d63f8df225768f2e659a4376a;p=kwin.git Fix uninitialized variable warning Last-Update: 2020-06-04 If the YUV format isn't found, the code depends on .format being 0. However, it was not initialized at all, so this patch initializes the format member. The other members need not be initialized. Last-Update: 2020-06-04 Gbp-Pq: Name uninitialized-yuvformat.patch --- diff --git a/src/platformsupport/scenes/opengl/egl_dmabuf.cpp b/src/platformsupport/scenes/opengl/egl_dmabuf.cpp index 158f2c6..3d29089 100644 --- a/src/platformsupport/scenes/opengl/egl_dmabuf.cpp +++ b/src/platformsupport/scenes/opengl/egl_dmabuf.cpp @@ -152,7 +152,7 @@ KWaylandServer::LinuxDmaBufV1ClientBuffer *EglDmabuf::importBuffer(DmaBufAttribu KWaylandServer::LinuxDmaBufV1ClientBuffer *EglDmabuf::yuvImport(DmaBufAttributes &&attrs, quint32 flags) { - YuvFormat yuvFormat; + YuvFormat yuvFormat { 0 }; for (YuvFormat f : yuvFormats) { if (f.format == attrs.format) { yuvFormat = f;