[RFC PATCH 18/23] ALSA: pci/es1938: remove 'set but not used' warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix W=1 warning. Mark the 'audiostatus' variable as __always_unused.

sound/pci/es1938.c: In function ‘snd_es1938_interrupt’:
sound/pci/es1938.c:1622:24: warning: variable ‘audiostatus’ set but
not used [-Wunused-but-set-variable]
 1622 |  unsigned char status, audiostatus;
      |                        ^~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
---
 sound/pci/es1938.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index b4a0adf7451c..09704a78d799 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -1619,7 +1619,8 @@ static int snd_es1938_create(struct snd_card *card,
 static irqreturn_t snd_es1938_interrupt(int irq, void *dev_id)
 {
 	struct es1938 *chip = dev_id;
-	unsigned char status, audiostatus;
+	unsigned char status;
+	__always_unused unsigned char audiostatus;
 	int handled = 0;
 
 	status = inb(SLIO_REG(chip, IRQCONTROL));
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux