From 7ecdf370bc137dab124eab134781ca23aa2ab5b4 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 9 Aug 2018 22:26:17 -0500 Subject: [PATCH] voicebus: Initialize stack buffer. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quiets the following (valid) warning from gcc 7.3.0: drivers/dahdi/voicebus/GpakApi.c:1648:22: warning: ‘MsgBuffer[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized] MsgBuffer[1] |= DTMF_UPDATE_MASK; --- drivers/dahdi/voicebus/GpakApi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dahdi/voicebus/GpakApi.c b/drivers/dahdi/voicebus/GpakApi.c index d65732b..4ff5dcb 100644 --- a/drivers/dahdi/voicebus/GpakApi.c +++ b/drivers/dahdi/voicebus/GpakApi.c @@ -1636,6 +1636,8 @@ gpakWriteSysParmsStatus_t gpakWriteSystemParms( DSP_WORD MsgBuffer[MSG_BUFFER_SIZE]; /* message buffer */ DSP_WORD DspStatus; /* DSP's reply status */ + memset(MsgBuffer, 0, sizeof(MsgBuffer)); + /* Make sure the DSP Id is valid. */ if (DspId >= MAX_DSP_CORES) return (WspInvalidDsp);