summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2016-11-30 00:42:01 +0900
committerTakashi Iwai <tiwai@suse.de>2016-12-13 00:20:53 +0100
commit5a2bddfc79912d7537a3a43e28481bfefa9db88e (patch)
tree58f43dc717851e524e6a53ae356f7936aee01cf6
parentd008e1ac203dde67838effe43bd512d38bd92f24 (diff)
downloadalsa-lib-5a2bddfc79912d7537a3a43e28481bfefa9db88e.tar.gz
topology: fix unused-variable warnings introduced to build_link()
A function with unused automatic variables was recently introduced to this library, then compiler generates below warnings. pcm.c: In function ‘build_link’: pcm.c:213:6: warning: unused variable ‘i’ [-Wunused-variable] int i, num_hw_configs = 0, err = 0; ^ pcm.c:210:43: warning: unused variable ‘cmpnt’ [-Wunused-variable] struct snd_soc_tplg_link_cmpnt *codec, *cmpnt; ^~~~~ pcm.c:210:35: warning: unused variable ‘codec’ [-Wunused-variable] struct snd_soc_tplg_link_cmpnt *codec, *cmpnt; ^~~~~ pcm.c:209:20: warning: unused variable ‘ref_elem’ [-Wunused-variable] struct tplg_elem *ref_elem = NULL; This commit removes them. Fixes: 53f7711769d4("topology: Define a function to build a single physical DAI link") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--src/topology/pcm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index 2e0a1209..8f8a7031 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -206,11 +206,9 @@ static int tplg_build_stream_cfg(snd_tplg_t *tplg,
static int build_link(snd_tplg_t *tplg, struct tplg_elem *elem)
{
struct snd_soc_tplg_link_config *link = elem->link;
- struct tplg_elem *ref_elem = NULL;
- struct snd_soc_tplg_link_cmpnt *codec, *cmpnt;
struct tplg_ref *ref;
struct list_head *base, *pos;
- int i, num_hw_configs = 0, err = 0;
+ int num_hw_configs = 0, err = 0;
err = tplg_build_stream_cfg(tplg, link->stream,
link->num_streams);