From 5a2bddfc79912d7537a3a43e28481bfefa9db88e Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Wed, 30 Nov 2016 00:42:01 +0900 Subject: topology: fix unused-variable warnings introduced to build_link() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Takashi Iwai --- src/topology/pcm.c | 4 +--- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.1