[alsa-devel] Compiler warning - overriding codec compress type
Patrick Lai
plai at codeaurora.org
Mon Apr 18 08:37:34 CEST 2011
Hi,
I got a compiler warning soc-core.c: In function
'snd_soc_instantiate_cards' warning: 'compress_type' may be used
uninitialized in this function. In reality, compress_type is defined as
local variable in snd_soc_instantiate_card().
My kernel version is 2.6.38. Has the warning being addressed in 2.6.39
or 2.6.40 patches? If not, after tracing through the code, I think the
fix should look like the following:
list_for_each_entry(codec, &codec_list, list) {
if (codec->cache_init)
continue;
+ compress_type = 0;
/* check to see if we need to override the compress_type */
for (i = 0; i < card->num_configs; ++i) {
codec_conf = &card->codec_conf[i];
Please advise
Thanks
Patrick
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
More information about the Alsa-devel
mailing list