Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1358596 > unrolled thread

[patch] ALSA: mixart: silence an uninitialized variable warning

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-03-16 08:50 +0100
Last post2016-03-16 16:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [patch] ALSA: mixart: silence an uninitialized variable warning Dan Carpenter <dan.carpenter@oracle.com> - 2016-03-16 08:50 +0100
    Re: [patch] ALSA: mixart: silence an uninitialized variable warning walter harms <wharms@bfs.de> - 2016-03-16 09:30 +0100
    Re: [alsa-devel] [patch] ALSA: mixart: silence an uninitialized variable warning Takashi Iwai <tiwai@suse.de> - 2016-03-16 16:40 +0100

#1358596 — [patch] ALSA: mixart: silence an uninitialized variable warning

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-03-16 08:50 +0100
Subject[patch] ALSA: mixart: silence an uninitialized variable warning
Message-ID<rdeno-5MN-15@gated-at.bofh.it>
We could print the uninitialized value of "stat" in the error message.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index bc81b9f..25c0ddd 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -132,7 +132,7 @@ static int mixart_set_pipe_state(struct mixart_mgr *mgr,
 	}
 
 	if(start) {
-		u32 stat;
+		u32 stat = 0;
 
 		group_state.pipe_count = 0; /* in case of start same command once again with pipe_count=0 */
 

[toc] | [next] | [standalone]


#1358676

Fromwalter harms <wharms@bfs.de>
Date2016-03-16 09:30 +0100
Message-ID<rdf07-6ju-41@gated-at.bofh.it>
In reply to#1358596

Am 16.03.2016 08:42, schrieb Dan Carpenter:
> We could print the uninitialized value of "stat" in the error message.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
> index bc81b9f..25c0ddd 100644
> --- a/sound/pci/mixart/mixart.c
> +++ b/sound/pci/mixart/mixart.c
> @@ -132,7 +132,7 @@ static int mixart_set_pipe_state(struct mixart_mgr *mgr,
>  	}
>  
>  	if(start) {
> -		u32 stat;
> +		u32 stat = 0;
>  
>  		group_state.pipe_count = 0; /* in case of start same command once again with pipe_count=0 */
>  

@maintainer:
can someone please fix/remove the comment here ? it read like if (pipe_count==0) pipe_count = 0.

just my 2 cents,

re,
 wh

> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[toc] | [prev] | [next] | [standalone]


#1359097 — Re: [alsa-devel] [patch] ALSA: mixart: silence an uninitialized variable warning

FromTakashi Iwai <tiwai@suse.de>
Date2016-03-16 16:40 +0100
SubjectRe: [alsa-devel] [patch] ALSA: mixart: silence an uninitialized variable warning
Message-ID<rdlId-2mU-5@gated-at.bofh.it>
In reply to#1358596
On Wed, 16 Mar 2016 08:42:13 +0100,
Dan Carpenter wrote:
> 
> We could print the uninitialized value of "stat" in the error message.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks.


Takashi

> 
> diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
> index bc81b9f..25c0ddd 100644
> --- a/sound/pci/mixart/mixart.c
> +++ b/sound/pci/mixart/mixart.c
> @@ -132,7 +132,7 @@ static int mixart_set_pipe_state(struct mixart_mgr *mgr,
>  	}
>  
>  	if(start) {
> -		u32 stat;
> +		u32 stat = 0;
>  
>  		group_state.pipe_count = 0; /* in case of start same command once again with pipe_count=0 */
>  
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web