Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Lai <plai@codeaurora.org>
To: alsa-devel <alsa-devel@alsa-project.org>
Subject: Compiler warning - overriding codec compress type
Date: Sun, 17 Apr 2011 23:37:34 -0700	[thread overview]
Message-ID: <4DABDC2E.9080103@codeaurora.org> (raw)

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.

             reply	other threads:[~2011-04-18  6:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18  6:37 Patrick Lai [this message]
2011-04-18  9:25 ` Compiler warning - overriding codec compress type Clemens Ladisch
2011-04-18 10:30 ` Mark Brown
2011-04-18 18:53   ` Patrick Lai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DABDC2E.9080103@codeaurora.org \
    --to=plai@codeaurora.org \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox