projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78bd8f5
)
ALSA: caiaq: Fix -Wformat-truncation warning
author
Takashi Iwai
<tiwai@suse.de>
Fri, 15 Sep 2023 08:27:53 +0000
(10:27 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 15 Sep 2023 11:21:31 +0000
(13:21 +0200)
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>
sound/usb/caiaq/device.c
patch
|
blob
|
history
diff --git
a/sound/usb/caiaq/device.c
b/sound/usb/caiaq/device.c
index
49f63f8
..
b5cbf1f
100644
(file)
--- 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)",
+ s
c
nprintf(card->longname, sizeof(card->longname), "%s %s (%s)",
cdev->vendor_name, cdev->product_name, usbpath);
setup_card(cdev);