[asterisk-commits] kpfleming: branch 1.4 r83974 - /branches/1.4/channels/chan_alsa.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 26 18:53:03 CDT 2007
Author: kpfleming
Date: Wed Sep 26 18:53:03 2007
New Revision: 83974
URL: http://svn.digium.com/view/asterisk?view=rev&rev=83974
Log:
avoid the weird usage of assert() in the ALSA header files that gcc 4.2 wants to complain about
Modified:
branches/1.4/channels/chan_alsa.c
Modified: branches/1.4/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_alsa.c?view=diff&rev=83974&r1=83973&r2=83974
==============================================================================
--- branches/1.4/channels/chan_alsa.c (original)
+++ branches/1.4/channels/chan_alsa.c Wed Sep 26 18:53:03 2007
@@ -367,7 +367,8 @@
} else
ast_log(LOG_DEBUG, "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);
@@ -416,7 +417,8 @@
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
More information about the asterisk-commits
mailing list