From af967e17050d813aaf209a4c6197775d3b92bcfb Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Mon, 11 Jun 2018 12:48:58 +0200 Subject: Remove yocto compilation errors Remove yocto compilation errors concerning : - An unitialized variable in 'alsa-api-pcm.c' - A wrong use of asprintf in 'alsa-api-streams.c' Change-Id: I170993d060a7a1d1a1c20979da0645c5ef2b1b91 Signed-off-by: Jonathan Aillet --- plugins/alsa/alsa-api-pcm.c | 2 +- plugins/alsa/alsa-api-streams.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/alsa/alsa-api-pcm.c b/plugins/alsa/alsa-api-pcm.c index 6560271..084b54b 100644 --- a/plugins/alsa/alsa-api-pcm.c +++ b/plugins/alsa/alsa-api-pcm.c @@ -152,7 +152,7 @@ OnErrorExit: STATIC int PcmSetControl(SoftMixerT *mixer, AlsaSndCtlT *sndcard, AlsaSndControlT *control, volumeT volType, int *newvol, int *oldval) { snd_ctl_elem_id_t* elemId = NULL; snd_ctl_elem_info_t *elemInfo; - int error, value; + int error, value = 0; long curval; assert(control->numid); diff --git a/plugins/alsa/alsa-api-streams.c b/plugins/alsa/alsa-api-streams.c index c8702ed..e11affe 100644 --- a/plugins/alsa/alsa-api-streams.c +++ b/plugins/alsa/alsa-api-streams.c @@ -401,7 +401,7 @@ STATIC AlsaStreamAudioT * AttachOneStream(SoftMixerT *mixer, const char *uid, co if (stream->verb) asprintf((char**) &stream->verb, "%s:%s", prefix, stream->verb); else asprintf((char**) &stream->verb, "%s:%s", prefix, stream->uid); } else { - if (!stream->verb) asprintf((char**) &stream->verb, stream->uid); + if (!stream->verb) stream->verb = strdup(stream->uid); } // implement stream PCM with corresponding thread and controls -- cgit 1.2.3-korg