From aa92a7a90d7bc142ff201303f677d0ac06e36b8e Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 21 Jan 2021 17:25:53 +1100 Subject: [PATCH] =?UTF-8?q?[client]=20app:=20fix=20`error:=20=E2=80=98data?= =?UTF-8?q?Size=E2=80=99=20may=20be=20used=20uninitialized`=20(take=202)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/main.c b/client/src/main.c index 49114ad9..275211e5 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -527,7 +527,7 @@ static int frameThread(void * unused) PLGMPClientQueue queue; uint32_t formatVer = 0; - size_t dataSize; + size_t dataSize = 0; LG_RendererFormat lgrFormat; struct DMAFrameInfo dmaInfo[LGMP_Q_FRAME_LEN] = {0}; @@ -672,7 +672,7 @@ static int frameThread(void * unused) updatePositionInfo(); } - if (g_state.formatValid && useDMA) + if (useDMA) { /* find the existing dma buffer if it exists */ for(int i = 0; i < sizeof(dmaInfo) / sizeof(struct DMAFrameInfo); ++i)