diff src/alsa/audio.c @ 2022:c6023e5efd06

warning fixes
author William Pitcock <nenolod@atheme.org>
date Thu, 11 Oct 2007 15:19:28 -0500
parents c62011e48c61
children 70b1f1fc4804
line wrap: on
line diff
--- a/src/alsa/audio.c	Thu Oct 11 15:13:59 2007 -0500
+++ b/src/alsa/audio.c	Thu Oct 11 15:19:28 2007 -0500
@@ -141,7 +141,7 @@
 	/* if debug mode is enabled, dump ALSA state to console */
 	if (alsa_cfg.debug)
 	{
-		snd_pcm_status_t *alsa_status;
+		snd_pcm_status_t *alsa_status = NULL;
 		snd_pcm_status_alloca(&alsa_status);
 		if (snd_pcm_status(alsa_pcm, alsa_status) < 0)
 			g_warning("xrun_recover(): snd_pcm_status() failed");
@@ -587,11 +587,6 @@
  */
 static void alsa_do_write(gpointer data, int length)
 {
-	EffectPlugin *ep = NULL;
-	int new_freq;
-	int new_chn;
-	AFormat f;
-
 	if (paused)
 		return;
 
@@ -826,8 +821,8 @@
 static int alsa_setup(struct snd_format *f)
 {
 	int err;
-	snd_pcm_hw_params_t *hwparams;
-	snd_pcm_sw_params_t *swparams;
+	snd_pcm_hw_params_t *hwparams = NULL;
+	snd_pcm_sw_params_t *swparams = NULL;
 	unsigned int alsa_buffer_time, alsa_period_time;
 	snd_pcm_uframes_t alsa_buffer_size, alsa_period_size;
 
@@ -859,12 +854,12 @@
 
 	if (alsa_cfg.debug)
 	{
-		snd_pcm_info_t *info;
+		snd_pcm_info_t *info = NULL;
 		int alsa_card, alsa_device, alsa_subdevice;
 
 		snd_pcm_info_alloca(&info);
 		snd_pcm_info(alsa_pcm, info);
-		alsa_card =  snd_pcm_info_get_card(info);
+		alsa_card = snd_pcm_info_get_card(info);
 		alsa_device = snd_pcm_info_get_device(info);
 		alsa_subdevice = snd_pcm_info_get_subdevice(info);
 		printf("Card %i, Device %i, Subdevice %i\n",