]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 83974 via svnmerge from
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 27 Sep 2007 00:08:47 +0000 (00:08 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 27 Sep 2007 00:08:47 +0000 (00:08 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83974 | kpfleming | 2007-09-26 16:53:03 -0700 (Wed, 26 Sep 2007) | 2 lines

avoid the weird usage of assert() in the ALSA header files that gcc 4.2 wants to complain about

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83986 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_alsa.c

index d41dfa37cda2de93a364b4bc87bb028f7bf81b1b..6bc838e7960ecc9cee3653b8a0379b0eaabc3bde 100644 (file)
@@ -368,7 +368,8 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream)
                ast_debug(1, "Opening device %s in %s mode\n", dev, (stream == SND_PCM_STREAM_CAPTURE) ? "read" : "write");
        }
 
-       snd_pcm_hw_params_alloca(&hwparams);
+       hwparams = alloca(snd_pcm_hw_params_sizeof());
+       memset(hwparams, 0, snd_pcm_hw_params_sizeof());
        snd_pcm_hw_params_any(handle, hwparams);
 
        err = snd_pcm_hw_params_set_access(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
@@ -419,7 +420,8 @@ static snd_pcm_t *alsa_card_init(char *dev, snd_pcm_stream_t stream)
        if (err < 0)
                ast_log(LOG_ERROR, "Couldn't set the new hw params: %s\n", snd_strerror(err));
 
-       snd_pcm_sw_params_alloca(&swparams);
+       swparams = alloca(snd_pcm_sw_params_sizeof());
+       memset(swparams, 0, snd_pcm_sw_params_sizeof());
        snd_pcm_sw_params_current(handle, swparams);
 
 #if 1