From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>, alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/2] ASoC: Fix 'may be used uninitialized' warnings
Date: Thu, 27 Dec 2012 16:42:51 +0000 [thread overview]
Message-ID: <20121227162617.GB5005@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1356371738-15997-2-git-send-email-festevam@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 475 bytes --]
On Mon, Dec 24, 2012 at 03:55:38PM -0200, Fabio Estevam wrote:
> - u16 reg_l, reg_r, dcs_cfg, dcs_reg;
> + u16 reg_l = 0, reg_r = 0, dcs_cfg, dcs_reg;
No, this is a terrible idea. Apart from the coding style thing all
you're doing here is just ensuring that a value is set in the variable
without any analysis saying that this is a sensible value to set or that
the compiler hasn't spotted a genuine issue.
There's also the possibility that the compiler is just buggy...
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-12-27 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-24 17:55 [PATCH 1/2] ASoC: wm8985: Refactor set_pll code to avoid gcc warnings Fabio Estevam
2012-12-24 17:55 ` [PATCH 2/2] ASoC: Fix 'may be used uninitialized' warnings Fabio Estevam
2012-12-27 16:42 ` Mark Brown [this message]
2012-12-27 16:49 ` [PATCH 1/2] ASoC: wm8985: Refactor set_pll code to avoid gcc warnings Mark Brown
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=20121227162617.GB5005@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).