voicebus: Initialize stack buffer.
authorShaun Ruffell <sruffell@sruffell.net>
Fri, 10 Aug 2018 03:26:17 +0000 (22:26 -0500)
committerShaun Ruffell <sruffell@sruffell.net>
Mon, 3 Sep 2018 15:26:43 +0000 (10:26 -0500)
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

index d65732b..4ff5dcb 100644 (file)
@@ -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);