* [PATCH] ALSA: hda - Remove compilation warning
@ 2016-06-20 19:42 Helen Koike
2016-06-21 5:49 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Helen Koike @ 2016-06-20 19:42 UTC (permalink / raw)
To: alsa-devel, tiwai, linux-kernel, trivial; +Cc: Helen Koike
Remove the warning:
warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Helen Koike <helen.koike@collabora.co.uk>
---
sound/hda/hdac_regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c
index 87041dd..7be6ca1 100644
--- a/sound/hda/hdac_regmap.c
+++ b/sound/hda/hdac_regmap.c
@@ -279,7 +279,7 @@ static int hda_reg_write(void *context, unsigned int reg, unsigned int val)
{
struct hdac_device *codec = context;
unsigned int verb;
- int i, bytes, err;
+ int i, bytes, err = 0;
int pm_lock = 0;
if (codec->caps_overwriting)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ALSA: hda - Remove compilation warning
2016-06-20 19:42 [PATCH] ALSA: hda - Remove compilation warning Helen Koike
@ 2016-06-21 5:49 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2016-06-21 5:49 UTC (permalink / raw)
To: Helen Koike; +Cc: alsa-devel, trivial, linux-kernel
On Mon, 20 Jun 2016 21:42:31 +0200,
Helen Koike wrote:
>
> Remove the warning:
> warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized]
It's a false positive, a compiler problem.
Takashi
>
> Signed-off-by: Helen Koike <helen.koike@collabora.co.uk>
> ---
> sound/hda/hdac_regmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c
> index 87041dd..7be6ca1 100644
> --- a/sound/hda/hdac_regmap.c
> +++ b/sound/hda/hdac_regmap.c
> @@ -279,7 +279,7 @@ static int hda_reg_write(void *context, unsigned int reg, unsigned int val)
> {
> struct hdac_device *codec = context;
> unsigned int verb;
> - int i, bytes, err;
> + int i, bytes, err = 0;
> int pm_lock = 0;
>
> if (codec->caps_overwriting)
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-21 5:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 19:42 [PATCH] ALSA: hda - Remove compilation warning Helen Koike
2016-06-21 5:49 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®