From dfa211dbd50fd8da82f94c63aa814c9d3fea1d53 Mon Sep 17 00:00:00 2001 From: Jiri Palecek Date: Wed, 6 Jan 2021 14:50:52 +0000 Subject: [PATCH] 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 --- platformsupport/scenes/opengl/egl_dmabuf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2