Skip to content

Commit d4d5633

Browse files
committed
ALSA: firewire: dice: Fix printf warning with W=1
The use of snprintf() may cause a warning with W=1 due to the possibly truncated string. As the truncation doesn't really matter (and won't happen practically) in the case of dice driver, just shut it up by replacing with scnprintf(). Link: https://patch.msgid.link/20260227155705.1557224-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 05ac384 commit d4d5633

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/firewire/dice/dice.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static void dice_card_strings(struct snd_dice *dice)
122122
fw_csr_string(dev->config_rom + 5, CSR_VENDOR, vendor, sizeof(vendor));
123123
strscpy(model, "?");
124124
fw_csr_string(dice->unit->directory, CSR_MODEL, model, sizeof(model));
125-
snprintf(card->longname, sizeof(card->longname),
125+
scnprintf(card->longname, sizeof(card->longname),
126126
"%s %s (serial %u) at %s, S%d",
127127
vendor, model, dev->config_rom[4] & 0x3fffff,
128128
dev_name(&dice->unit->device), 100 << dev->max_speed);

0 commit comments

Comments
 (0)