[client] app: fix error: ‘dataSize’ may be used uninitialized (take 2)

This commit is contained in:
Geoffrey McRae 2021-01-21 17:25:53 +11:00
parent c83243f22c
commit aa92a7a90d

View file

@ -527,7 +527,7 @@ static int frameThread(void * unused)
PLGMPClientQueue queue; PLGMPClientQueue queue;
uint32_t formatVer = 0; uint32_t formatVer = 0;
size_t dataSize; size_t dataSize = 0;
LG_RendererFormat lgrFormat; LG_RendererFormat lgrFormat;
struct DMAFrameInfo dmaInfo[LGMP_Q_FRAME_LEN] = {0}; struct DMAFrameInfo dmaInfo[LGMP_Q_FRAME_LEN] = {0};
@ -672,7 +672,7 @@ static int frameThread(void * unused)
updatePositionInfo(); updatePositionInfo();
} }
if (g_state.formatValid && useDMA) if (useDMA)
{ {
/* find the existing dma buffer if it exists */ /* find the existing dma buffer if it exists */
for(int i = 0; i < sizeof(dmaInfo) / sizeof(struct DMAFrameInfo); ++i) for(int i = 0; i < sizeof(dmaInfo) / sizeof(struct DMAFrameInfo); ++i)