@@ -495,7 +495,6 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
495495 props -> v .guest_playing = 0 ;
496496 props -> v .stream_id = stream_id ;
497497
498- uint32_t period_bytes = props -> pp .period_bytes ;
499498 uint32_t channels = props -> pp .channels ;
500499 uint32_t rate = pcm_rate_tbl [props -> pp .rate ];
501500
@@ -513,7 +512,6 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
513512 uint32_t cnfa_period_bytes = bps_rate / 10 ;
514513 /* Calculate the period size (in frames) for CNFA . */
515514 uint32_t cnfa_period_frames = cnfa_period_bytes / VSND_CNFA_FRAME_SZ ;
516- uint32_t period_frames = period_bytes / VSND_CNFA_FRAME_SZ ;
517515
518516 /* The buffer size in frames when calling CNFAInit()
519517 * is actually period size (i.e., period size then divide
@@ -522,7 +520,6 @@ static void virtio_snd_read_pcm_prepare(const virtio_snd_pcm_hdr_t *query,
522520 props -> audio_host =
523521 CNFAInit (NULL , "semu-virtio-snd" , virtio_snd_cb , rate , 0 , channels , 0 ,
524522 cnfa_period_frames , NULL , NULL , & props -> v );
525- uint32_t sz = props -> pp .buffer_bytes ;
526523 pthread_mutex_init (& props -> lock .lock , NULL );
527524 pthread_cond_init (& props -> lock .readable , NULL );
528525 pthread_cond_init (& props -> lock .writable , NULL );
@@ -846,7 +843,8 @@ static int virtio_snd_tx_desc_handler(virtio_snd_state_t *vsnd,
846843 }
847844
848845 int idx = 0 ;
849- uint32_t stream_id ;
846+ uint32_t
847+ stream_id ; /* FIXME: solve uninitialized warning of this variable */
850848 uintptr_t base = (uintptr_t ) vsnd -> ram ;
851849 uint32_t ret_len = 0 ;
852850 list_for_each_entry (node , & q , q ) {
0 commit comments