diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-09-15 10:27:57 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-09-15 13:21:34 +0200 |
commit | bc44e10abb90ac65a7b5337cb3323ec1ce79fb9a (patch) | |
tree | 685c483559145bdaf0e5fe9dc9bf0c15ddb67a46 /sound/isa/opti9xx/miro.c | |
parent | 1e97acf3a6609c1329e23c2bf1e703c012bec848 (diff) |
ALSA: opti9x: Fix -Wformat-truncation warning
The filling of card->longname can be gracefully truncated, as it's
only informative. Use scnprintf() and suppress the superfluous
compile warning with -Wformat-truncation.
Link: https://lore.kernel.org/r/20230915082802.28684-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/opti9xx/miro.c')
-rw-r--r-- | sound/isa/opti9xx/miro.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c index 59242baed576..59792f2fada1 100644 --- a/sound/isa/opti9xx/miro.c +++ b/sound/isa/opti9xx/miro.c @@ -1344,10 +1344,10 @@ static int snd_miro_probe(struct snd_card *card) } strcpy(card->driver, "miro"); - snprintf(card->longname, sizeof(card->longname), - "%s: OPTi%s, %s at 0x%lx, irq %d, dma %d&%d", - card->shortname, miro->name, codec->pcm->name, - miro->wss_base + 4, miro->irq, miro->dma1, miro->dma2); + scnprintf(card->longname, sizeof(card->longname), + "%s: OPTi%s, %s at 0x%lx, irq %d, dma %d&%d", + card->shortname, miro->name, codec->pcm->name, + miro->wss_base + 4, miro->irq, miro->dma1, miro->dma2); if (mpu_port <= 0 || mpu_port == SNDRV_AUTO_PORT) rmidi = NULL; |