SOUND: atiixp, use uninitialized_var(chip)
Subsystems (3)
PATCH 1/4 SOUND: atiixp, use uninitialized_var(chip)
To avoid wrong compiler warnings, use unitialized_var(chip) in snd_atiixp_probe's from atiixp and atiixp_modem drivers.
'chip' is unused when unset due to retval being nonzero.
--- sound/pci/atiixp.c | 2 +- sound/pci/atiixp_modem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/atiixp.c +1 -1
@@ -1648,7 +1648,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) {struct snd_card *card; -struct atiixp *chip; +struct atiixp *uninitialized_var (chip );int err; err =snd_card_create (index, id,THIS_MODULE ,0 , &card);
sound/pci/atiixp_modem.c +1 -1
@@ -1285,7 +1285,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) {struct snd_card *card; -struct atiixp_modem *chip; +struct atiixp_modem *uninitialized_var (chip );int err; err =snd_card_create (index, id,THIS_MODULE ,0 , &card);
Signature · 1 line
1.6.3.3
PATCH 2/4 SOUND: serial-u16550, use unitialized_var(uart)
To avoid a wrong compiler warning, use unitialized_var(uart) in snd_uart16550_rmidi.
If uart is unitialized, we return before its use.
--- sound/drivers/serial-u16550.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/drivers/serial-u16550.c +1 -1
@@ -902,7 +902,7 @@ static int __devinit snd_uart16550_rmidi(struct snd_uart16550 *uart, int device,static int __devinit snd_serial_probe (struct platform_device *devptr) {struct snd_card *card; -struct snd_uart16550 *uart; +struct snd_uart16550 *uninitialized_var (uart );int err;int dev = devptr->id;
Signature · 1 line
1.6.3.3
PATCH 3/4 SOUND: via82xx, use uninitialized_var(chip)
In reply to Jiri SlabyTo avoid wrong compiler warnings, use unitialized_var(chip) in snd_via82xx_probe's from via82xx and via82xx_modem drivers.
'chip' is unused when unset due to retval being nonzero.
--- sound/pci/via82xx.c | 2 +- sound/pci/via82xx_modem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/pci/via82xx.c +1 -1
@@ -2435,7 +2435,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) {struct snd_card *card; -struct via82xx *chip; +struct via82xx *uninitialized_var (chip );int chip_type =0 , card_type;unsigned int i;int err;
sound/pci/via82xx_modem.c +1 -1
@@ -1165,7 +1165,7 @@ static int __devinit snd_via82xx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) {struct snd_card *card; -struct via82xx_modem *chip; +struct via82xx_modem *uninitialized_var (chip );int chip_type =0 , card_type;unsigned int i;int err;
Signature · 1 line
1.6.3.3
PATCH 4/4 SOUND: wm8900, use uninitialized_var(fll_div)
In reply to Jiri SlabyTo avoid a wrong compiler warning, use unitialized_var(fll_div) in wm8900_set_fll.
If fll_div members are unitialized, we return before their use due to error.
--- sound/soc/codecs/wm8900.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8900.c +1 -1
@@ -747,7 +747,7 @@ static int wm8900_set_fll(struct snd_soc_codec *codec, int fll_id, unsigned int freq_in, unsigned int freq_out) { struct wm8900_priv *wm8900 = codec->private_data; -struct _fll_div fll_div; +struct _fll_div uninitialized_var (fll_div );unsigned int reg;if (wm8900->fll_in == freq_in && wm8900->fll_out == freq_out)
Signature · 1 line
1.6.3.3
At Tue, 25 Aug 2009 22:59:34 +0200,
Quoted 9 lines · Jiri Slaby
To avoid wrong compiler warnings, use
unitialized_var(chip)in snd_atiixp_probe's from atiixp andatiixp_modemdrivers.'chip' is unused when unset due to retval being nonzero.
Signed-off-by Jiri Slaby <[email protected]>Cc Takashi Iwai <[email protected]>Cc Jaroslav Kysela <[email protected]>
Thanks for patches. But I'm not sure whether to apply these. In general, uninitialized_var() should be avoided as much as possible, and I don't see these warnings in my build systems with a few different gcc versions. So, it must be seen only in a very small set of gcc versions, I guess. If so, adding this hack is fairly worthless...
Takashi
Quoted 34 lines
--- sound/pci/atiixp.c | 2 +- sound/pci/atiixp_modem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)sound/pci/atiixp.c +1
-1@@ -1648,7 +1648,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) {struct snd_card *card; -struct atiixp *chip; +struct atiixp *uninitialized_var (chip );int err; err =snd_card_create (index, id,THIS_MODULE ,0 , &card);sound/pci/atiixp_modem.c +1
-1@@ -1285,7 +1285,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) {struct snd_card *card; -struct atiixp_modem *chip; +struct atiixp_modem *uninitialized_var (chip );int err; err =snd_card_create (index, id,THIS_MODULE ,0 , &card);Signature · 1 line
1.6.3.3