From: Jiri Palecek Date: Wed, 6 Jan 2021 14:50:52 +0000 (+0000) Subject: Fix uninitialized variable warning X-Git-Tag: archive/raspbian/4%5.26.90-1+rpi1~1^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dfa211dbd50fd8da82f94c63aa814c9d3fea1d53;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/platformsupport/scenes/opengl/egl_dmabuf.cpp b/platformsupport/scenes/opengl/egl_dmabuf.cpp index 45d3251..55a8270 100644 --- a/platformsupport/scenes/opengl/egl_dmabuf.cpp +++ b/platformsupport/scenes/opengl/egl_dmabuf.cpp @@ -271,7 +271,7 @@ KWaylandServer::LinuxDmabufUnstableV1Buffer* EglDmabuf::yuvImport(const QVector< const QSize &size, Flags flags) { - YuvFormat yuvFormat; + YuvFormat yuvFormat { 0 }; for (YuvFormat f : yuvFormats) { if (f.format == format) { yuvFormat = f;