From e6c30c3cc7714c0614a44e2616d76519b3960e45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20V=C3=A4in=C3=B6l=C3=A4?= Date: Wed, 1 Dec 2021 12:24:52 +0200 Subject: [PATCH] Zero initialize array in internal tests This suppresses a -Wmaybe-uninitialized warning in GCC 11 release builds. Affects: dE-IT.delibs.decpp.block_buffer Components: Framework VK-GL-CTS issue: 3378 Change-Id: I2315b5cdeecb6e9a54dd419c88134f30a3335029 --- framework/delibs/decpp/deBlockBuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/delibs/decpp/deBlockBuffer.cpp b/framework/delibs/decpp/deBlockBuffer.cpp index 7e00594..e2f5322 100644 --- a/framework/delibs/decpp/deBlockBuffer.cpp +++ b/framework/delibs/decpp/deBlockBuffer.cpp @@ -25,6 +25,7 @@ #include "deRandom.hpp" #include "deThread.hpp" #include "deInt32.h" +#include "deMemory.h" #include @@ -239,6 +240,8 @@ public: deUint8 tmp[1024]; Random rnd(m_seed); + deMemset(tmp, 0, DE_LENGTH_OF_ARRAY(tmp)); + for (;;) { int blockSize = rnd.getInt(1, DE_LENGTH_OF_ARRAY(tmp)); -- 2.7.4