Skip to contentSkip to conversation

linux-next: build warning after merge of Linus' tree

DISCUSSION Stephen Rothwell 3 participants 5 messages Jul 29, 2019 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the origin tree, today's linux-next build (powerpc allyesconfig) produced this warning:

sound/aoa/codecs/onyx.c: In function 'onyx_snd_single_bit_get':
sound/aoa/codecs/onyx.c:377:37: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]

  ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity;
                                     ^~~~~~~~~~~~

Introduced by commit

f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")

This warning has been around for a long time. It could possibly be suppressed by checking for errors returned by onyx_read_register().

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 11 lines · Stephen Rothwell

Hi all,

After merging the origin tree, today's linux-next build (powerpc allyesconfig) produced this warning:

sound/aoa/codecs/onyx.c: In function 'onyx_snd_single_bit_get':
sound/aoa/codecs/onyx.c:377:37: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]

  ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity;
                                     ^~~~~~~~~~~~
Quoted 6 lines

Introduced by commit

f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")

This warning has been around for a long time. It could possibly be suppressed by checking for errors returned by onyx_read_register().

Yes, or simply zero-ing the variable in onyx_read_register(). The current code ignores the read error and it's been OK over a decade :)

thanks,

Takashi

#2 lore raw
Quoted 14 lines · Takashi Iwai
Quoted 12 lines · Stephen Rothwell

Hi all,

After merging the origin tree, today's linux-next build (powerpc allyesconfig) produced this warning:

sound/aoa/codecs/onyx.c: In function 'onyx_snd_single_bit_get':
sound/aoa/codecs/onyx.c:377:37: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]

  ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity;
                                     ^~~~~~~~~~~~

Introduced by commit

Quoted 7 lines
Quoted 4 lines

f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")

This warning has been around for a long time. It could possibly be suppressed by checking for errors returned by onyx_read_register().

Yes, or simply zero-ing the variable in onyx_read_register(). The current code ignores the read error and it's been OK over a decade :)

Yeah, it's pretty weird that it never showed up before. I was wondering for a minute why I was CC'ed on a sound merge issue :-)

Do you want me to send a patch or just commit something to suppress this?

johannes

#3 lore raw
Quoted 18 lines · Johannes Berg
Quoted 16 lines · Takashi Iwai
Quoted 14 lines · Stephen Rothwell

Hi all,

After merging the origin tree, today's linux-next build (powerpc allyesconfig) produced this warning:

sound/aoa/codecs/onyx.c: In function 'onyx_snd_single_bit_get':
sound/aoa/codecs/onyx.c:377:37: warning: 'c' may be used uninitialized in this function [-Wmaybe-uninitialized]

  ucontrol->value.integer.value[0] = !!(c & mask) ^ polarity;
                                     ^~~~~~~~~~~~

Introduced by commit

f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This warning has been around for a long time. It could possibly be suppressed by checking for errors returned by onyx_read_register().

Yes, or simply zero-ing the variable in onyx_read_register(). The current code ignores the read error and it's been OK over a decade :)

Yeah, it's pretty weird that it never showed up before. I was wondering for a minute why I was CC'ed on a sound merge issue :-)

Maybe switched to a new gcc version?

Quoted 2 lines

Do you want me to send a patch or just commit something to suppress this?

Yes, that'd be appreciated.

Thanks!

Takashi

#4 lore raw

Hi all,

Quoted 8 lines · On Mon, 29 Jul 2019 09:07:10 +0200 Takashi Iwai <[email protected]> wrote:
Quoted 5 lines · Johannes Berg
Quoted 3 lines · Takashi Iwai
Quoted 2 lines

This warning has been around for a long time. It could possibly be suppressed by checking for errors returned by onyx_read_register().

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Yes, or simply zero-ing the variable in onyx_read_register(). The current code ignores the read error and it's been OK over a decade :)

Yeah, it's pretty weird that it never showed up before. I was wondering for a minute why I was CC'ed on a sound merge issue :-)

Maybe switched to a new gcc version?

Or the number of warnings in a powerpc allyesconfig build got low enough for me to finally take notice :-)

Signature · 2 lines
Cheers,
Stephen Rothwell