[RFC,02/23] ALSA: isa/gus: remove 'set but not used' warning
diff mbox series

Message ID 20200702193604.169059-3-pierre-louis.bossart@linux.intel.com
State New
Headers show
Series
  • ALSA: fix kernel-doc and W=1 warnings
Related show

Commit Message

Pierre-Louis Bossart July 2, 2020, 7:35 p.m. UTC
Fix W=1 warning by noting variable as __always_unused.

sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’:
sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not
used [-Wunused-but-set-variable]
   16 |  unsigned char stat, data, byte;

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/isa/gus/gus_uart.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/sound/isa/gus/gus_uart.c b/sound/isa/gus/gus_uart.c
index 7586619770b3..4fb4ed79e262 100644
--- a/sound/isa/gus/gus_uart.c
+++ b/sound/isa/gus/gus_uart.c
@@ -13,7 +13,8 @@ 
 static void snd_gf1_interrupt_midi_in(struct snd_gus_card * gus)
 {
 	int count;
-	unsigned char stat, data, byte;
+	unsigned char stat, byte;
+	__always_unused unsigned char data;
 	unsigned long flags;
 
 	count = 10;