diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-09-15 10:27:53 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-09-15 13:21:31 +0200 |
commit | e9dde5a98288d05313bea24466f76484b8d324bb (patch) | |
tree | 704f890d35cc3d5cb51e7ab9fb82f016034fe911 /sound | |
parent | 78bd8f5126f854872cc109cbac21c675d8539f3f (diff) |
ALSA: caiaq: 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-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/caiaq/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c index 49f63f878e6f..b5cbf1f195c4 100644 --- a/sound/usb/caiaq/device.c +++ b/sound/usb/caiaq/device.c @@ -485,7 +485,7 @@ static int init_card(struct snd_usb_caiaqdev *cdev) } usb_make_path(usb_dev, usbpath, sizeof(usbpath)); - snprintf(card->longname, sizeof(card->longname), "%s %s (%s)", + scnprintf(card->longname, sizeof(card->longname), "%s %s (%s)", cdev->vendor_name, cdev->product_name, usbpath); setup_card(cdev); |