Skip to contentSkip to conversation

ALSA: hda: Fix signedness of sscanf() arguments

PATCH New Takashi Iwai 1 participant 1 message Jan 27, 2022 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: Fix signedness of sscanf() arguments

The %x format of sscanf() takes an unsigned int pointer, while we pass a signed int pointer. Practically it's OK, but this may result in a compile warning. Let's fix it.

Fixes a235d5b8e550 ("ALSA: hda: Allow model option to specify PCI SSID alias")
---
 sound/pci/hda/hda_auto_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/hda_auto_parser.c +1 -1
index 82c492b05667..cd1db943b7e0 100644
@@ -981,7 +981,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
 	int id = HDA_FIXUP_ID_NOT_SET;
 	const char *name = NULL;
 	const char *type = NULL;
-	int vendor, device;
+	unsigned int vendor, device;
 
 	if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET)
 		return;
Signature · 1 line
2.31.1