Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -mm] sb16: Shut up uninitialized var build warning
       [not found] ` <alpine.LFD.0.999.0709022344550.27844@enigma.security.iitk.ac.in>
@ 2007-09-02 20:15   ` Satyam Sharma
  2007-09-02 22:06     ` Rene Herman
  2007-09-02 20:21   ` [PATCH -mm] es18xx: " Satyam Sharma
  1 sibling, 1 reply; 7+ messages in thread
From: Satyam Sharma @ 2007-09-02 20:15 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Takashi Iwai, Jaroslav Kysela, alsa-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1127 bytes --]


sound/isa/sb16/sb16.c: In function ‘snd_sb16_isa_probe’:
sound/isa/sb16/sb16.c:559: warning: ‘err’ may be used uninitialized in this function

is a bogus warning, so let's shut it up.

Signed-off-by: Satyam Sharma <satyam@infradead.org>

---

 sound/isa/sb/sb16.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.23-rc4-mm1/sound/isa/sb/sb16.c~fix	2007-09-02 21:41:51.000000000 +0530
+++ linux-2.6.23-rc4-mm1/sound/isa/sb/sb16.c	2007-09-02 21:42:56.000000000 +0530
@@ -556,7 +556,6 @@ static int __devinit snd_sb16_isa_match(
 
 static int __devinit snd_sb16_isa_probe(struct device *pdev, unsigned int dev)
 {
-	int err;
 	static int possible_irqs[] = {5, 9, 10, 7, -1};
 	static int possible_dmas8[] = {1, 3, 0, -1};
 	static int possible_dmas16[] = {5, 6, 7, -1};
@@ -585,6 +584,8 @@ static int __devinit snd_sb16_isa_probe(
 	else {
 		static int possible_ports[] = {0x220, 0x240, 0x260, 0x280};
 		int i;
+		int uninitialized_var(err);
+
 		for (i = 0; i < ARRAY_SIZE(possible_ports); i++) {
 			port[dev] = possible_ports[i];
 			err = snd_sb16_isa_probe1(dev, pdev);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH -mm] es18xx: Shut up uninitialized var build warning
       [not found] ` <alpine.LFD.0.999.0709022344550.27844@enigma.security.iitk.ac.in>
  2007-09-02 20:15   ` [PATCH -mm] sb16: Shut up uninitialized var build warning Satyam Sharma
@ 2007-09-02 20:21   ` Satyam Sharma
  2007-09-02 22:14     ` Rene Herman
  1 sibling, 1 reply; 7+ messages in thread
From: Satyam Sharma @ 2007-09-02 20:21 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Takashi Iwai, Jaroslav Kysela, alsa-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1135 bytes --]


sound/isa/es18xx.c: In function ‘snd_es18xx_isa_probe’:
sound/isa/es18xx.c:2251: warning: ‘err’ may be used uninitialized in this function

gcc is a sad, sad compiler. This warning is bogus so let's shut it up.

Signed-off-by: Satyam Sharma <satyam@infradead.org>

---

 sound/isa/es18xx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.23-rc4-mm1/sound/isa/es18xx.c~fix	2007-09-02 21:16:54.000000000 +0530
+++ linux-2.6.23-rc4-mm1/sound/isa/es18xx.c	2007-09-02 21:30:13.000000000 +0530
@@ -2248,7 +2248,6 @@ static int __devinit snd_es18xx_isa_prob
 
 static int __devinit snd_es18xx_isa_probe(struct device *pdev, unsigned int dev)
 {
-	int err;
 	static int possible_irqs[] = {5, 9, 10, 7, 11, 12, -1};
 	static int possible_dmas[] = {1, 0, 3, 5, -1};
 
@@ -2276,6 +2275,8 @@ static int __devinit snd_es18xx_isa_prob
 	} else {
 		static unsigned long possible_ports[] = {0x220, 0x240, 0x260, 0x280};
 		int i;
+		int uninitialized_var(err);
+
 		for (i = 0; i < ARRAY_SIZE(possible_ports); i++) {
 			port[dev] = possible_ports[i];
 			err = snd_es18xx_isa_probe1(dev, pdev);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm] sb16: Shut up uninitialized var build warning
  2007-09-02 20:15   ` [PATCH -mm] sb16: Shut up uninitialized var build warning Satyam Sharma
@ 2007-09-02 22:06     ` Rene Herman
  2007-09-02 22:34       ` Satyam Sharma
  2007-09-20 17:52       ` Denys Vlasenko
  0 siblings, 2 replies; 7+ messages in thread
From: Rene Herman @ 2007-09-02 22:06 UTC (permalink / raw)
  To: Satyam Sharma
  Cc: Takashi Iwai, alsa-devel, Linux Kernel Mailing List,
	Jaroslav Kysela

On 09/02/2007 10:15 PM, Satyam Sharma wrote:

> sound/isa/sb16/sb16.c: In function ‘snd_sb16_isa_probe’:

Blah. Your message has:

	Content-Type: TEXT/PLAIN; charset=iso-2022-jp

This apparently is caused by a combination of GCC using groovy UTF tickmarks 
in its error messages when in a UTF locale and alpine believing it to be a 
great idea to automatically try for the "simplest" character set it can 
encode the content in. No idea why that means that iso-2022-jp is picked, 
but it is.

While I could actually read the message this time you should see what 
iso-2022-jp does to my font. It's scary. Best solution as far as I'm 
concerned is slap a few GCC developers (not that it wil help, but it'll 
certainly feel good) and then teach alpine to go for UTF-8 directly if 
US-ASCII won't do.

As to the content of this patch -- I'd almost say it's better to live with 
the warning than with that unitialized_var() thing. That ARRAY_SIZE is very 
much a compile time constant, so exactly how dumb must GCC get before we get 
to say to here and no further?

> --- linux-2.6.23-rc4-mm1/sound/isa/sb/sb16.c~fix	2007-09-02 21:41:51.000000000 +0530
> +++ linux-2.6.23-rc4-mm1/sound/isa/sb/sb16.c	2007-09-02 21:42:56.000000000 +0530
> @@ -556,7 +556,6 @@ static int __devinit snd_sb16_isa_match(
>  
>  static int __devinit snd_sb16_isa_probe(struct device *pdev, unsigned int dev)
>  {
> -	int err;
>  	static int possible_irqs[] = {5, 9, 10, 7, -1};
>  	static int possible_dmas8[] = {1, 3, 0, -1};
>  	static int possible_dmas16[] = {5, 6, 7, -1};
> @@ -585,6 +584,8 @@ static int __devinit snd_sb16_isa_probe(
>  	else {
>  		static int possible_ports[] = {0x220, 0x240, 0x260, 0x280};
>  		int i;
> +		int uninitialized_var(err);
> +
>  		for (i = 0; i < ARRAY_SIZE(possible_ports); i++) {
>  			port[dev] = possible_ports[i];
>  			err = snd_sb16_isa_probe1(dev, pdev);

Rene.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm] es18xx: Shut up uninitialized var build warning
  2007-09-02 20:21   ` [PATCH -mm] es18xx: " Satyam Sharma
@ 2007-09-02 22:14     ` Rene Herman
  0 siblings, 0 replies; 7+ messages in thread
From: Rene Herman @ 2007-09-02 22:14 UTC (permalink / raw)
  To: Satyam Sharma
  Cc: Takashi Iwai, alsa-devel, Linux Kernel Mailing List,
	Jaroslav Kysela

On 09/02/2007 10:21 PM, Satyam Sharma wrote:

> sound/isa/es18xx.c: In function ‘snd_es18xx_isa_probe’:
> sound/isa/es18xx.c:2251: warning: ‘err’ may be used uninitialized in this function
> 
> gcc is a sad, sad compiler. This warning is bogus so let's shut it up.

Same situation, same comment (and same charset :-( ) as the sb16 one.

Rene.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm] sb16: Shut up uninitialized var build warning
  2007-09-02 22:06     ` Rene Herman
@ 2007-09-02 22:34       ` Satyam Sharma
  2007-09-20 17:52       ` Denys Vlasenko
  1 sibling, 0 replies; 7+ messages in thread
From: Satyam Sharma @ 2007-09-02 22:34 UTC (permalink / raw)
  To: Rene Herman
  Cc: Takashi Iwai, alsa-devel, Linux Kernel Mailing List,
	Jaroslav Kysela

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1132 bytes --]



On Mon, 3 Sep 2007, Rene Herman wrote:
> 
> On 09/02/2007 10:15 PM, Satyam Sharma wrote:
> 
> > sound/isa/sb16/sb16.c: In function ‘snd_sb16_isa_probe’:
> 
> Blah. Your message has:
> 
> 	Content-Type: TEXT/PLAIN; charset=iso-2022-jp
> 
> This apparently is caused by a combination of GCC using groovy UTF tickmarks
> in its error messages when in a UTF locale and alpine believing it to be a
> great idea to automatically try for the "simplest" character set it can encode
> the content in. No idea why that means that iso-2022-jp is picked, but it is.

Yeah, precisely.

> As to the content of this patch -- I'd almost say it's better to live with the
> warning than with that unitialized_var() thing. That ARRAY_SIZE is very much a
> compile time constant, so exactly how dumb must GCC get before we get to say
> to here and no further?

Pretty dumb indeed -- in fact that's the case with 4 patches in this
series. Like Jeff said, that (gcc's) behaviour has likely even improved
w.r.t. later versions, so I guess it's fine if these 4 patches are not
applied -- I'll leave it upto the maintainers.

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm] sb16: Shut up uninitialized var build warning
  2007-09-02 22:06     ` Rene Herman
  2007-09-02 22:34       ` Satyam Sharma
@ 2007-09-20 17:52       ` Denys Vlasenko
  2007-09-22  4:20         ` Rene Herman
  1 sibling, 1 reply; 7+ messages in thread
From: Denys Vlasenko @ 2007-09-20 17:52 UTC (permalink / raw)
  To: Rene Herman
  Cc: Takashi Iwai, alsa-devel, Linux Kernel Mailing List,
	Jaroslav Kysela, Satyam Sharma

On Sunday 02 September 2007 23:06, Rene Herman wrote:
> On 09/02/2007 10:15 PM, Satyam Sharma wrote:
> 
> > sound/isa/sb16/sb16.c: In function ‘snd_sb16_isa_probe’:
> 
> Blah. Your message has:
> 
> 	Content-Type: TEXT/PLAIN; charset=iso-2022-jp
> 
> This apparently is caused by a combination of GCC using groovy UTF tickmarks 
> in its error messages when in a UTF locale and alpine believing it to be a 
> great idea to automatically try for the "simplest" character set it can 
> encode the content in. No idea why that means that iso-2022-jp is picked, 
> but it is.
> 
> While I could actually read the message this time you should see what 
> iso-2022-jp does to my font. It's scary. Best solution as far as I'm 
> concerned is slap a few GCC developers (not that it wil help, but it'll 
> certainly feel good) and then teach alpine to go for UTF-8 directly if 
> US-ASCII won't do.

rotfl.

Kindly give me permission to convert your email into gcc bugreport
and/or to forward it to gcc mailing list.
--
vda
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH -mm] sb16: Shut up uninitialized var build warning
  2007-09-20 17:52       ` Denys Vlasenko
@ 2007-09-22  4:20         ` Rene Herman
  0 siblings, 0 replies; 7+ messages in thread
From: Rene Herman @ 2007-09-22  4:20 UTC (permalink / raw)
  To: Denys Vlasenko
  Cc: Takashi Iwai, alsa-devel, Linux Kernel Mailing List,
	Jaroslav Kysela, Satyam Sharma

On 09/20/2007 07:52 PM, Denys Vlasenko wrote:

> On Sunday 02 September 2007 23:06, Rene Herman wrote:

>> Blah. Your message has:
>>
>> 	Content-Type: TEXT/PLAIN; charset=iso-2022-jp
>>
>> This apparently is caused by a combination of GCC using groovy UTF tickmarks 
>> in its error messages when in a UTF locale and alpine believing it to be a 
>> great idea to automatically try for the "simplest" character set it can 
>> encode the content in. No idea why that means that iso-2022-jp is picked, 
>> but it is.
>>
>> While I could actually read the message this time you should see what 
>> iso-2022-jp does to my font. It's scary. Best solution as far as I'm 
>> concerned is slap a few GCC developers (not that it wil help, but it'll 
>> certainly feel good) and then teach alpine to go for UTF-8 directly if 
>> US-ASCII won't do.
> 
> rotfl.
> 
> Kindly give me permission to convert your email into gcc bugreport
> and/or to forward it to gcc mailing list.

Blessings be upon thou, oh courageous one...

Rene.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-09-22  4:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.LFD.0.999.0709022344550.27844@enigma.security.iitk.ac.i n>
     [not found] ` <alpine.LFD.0.999.0709022344550.27844@enigma.security.iitk.ac.in>
2007-09-02 20:15   ` [PATCH -mm] sb16: Shut up uninitialized var build warning Satyam Sharma
2007-09-02 22:06     ` Rene Herman
2007-09-02 22:34       ` Satyam Sharma
2007-09-20 17:52       ` Denys Vlasenko
2007-09-22  4:20         ` Rene Herman
2007-09-02 20:21   ` [PATCH -mm] es18xx: " Satyam Sharma
2007-09-02 22:14     ` Rene Herman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox