diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2016-07-11 21:06:00 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-07-11 15:24:12 +0200 |
commit | 671dc9048672de684f93c00746750287808fdd99 (patch) | |
tree | f468c7a3e40ed910f5c3d43dd33f05650d714bf5 | |
parent | d7436eba8d43d78e97ceceaf41887cd1569d006d (diff) | |
download | alsa-lib-671dc9048672de684f93c00746750287808fdd99.tar.gz |
topology: initialize variable for error output
This commit fixes below compiler warnings.
In file included from ../../include/local.h:165:0,
from tplg_local.h:17,
from data.c:20:
data.c: In function ‘tplg_parse_tuples’:
../../include/error.h:64:21: warning: ‘id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
#define SNDERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, __VA_ARGS__) /**< Shows a sound error message. */
^
data.c:576:14: note: ‘id’ was declared here
const char *id;
^
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | src/topology/data.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/topology/data.c b/src/topology/data.c index 93eaf919..c0a098cd 100644 --- a/src/topology/data.c +++ b/src/topology/data.c @@ -578,6 +578,7 @@ static int parse_tuple_sets(snd_tplg_t *tplg, snd_config_t *cfg, int err; if (snd_config_get_type(cfg) != SND_CONFIG_TYPE_COMPOUND) { + snd_config_get_id(cfg, &id); SNDERR("error: compound type expected for %s", id); return -EINVAL; } |