mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
ALSA: usb-audio: scarlett_gen2: Fix another -Wformat-truncation warning
The recent enablement of -Wformat-truncation leads to a false-positive
warning for mixer_scarlett_gen2.c.
For suppressing the warning, replace snprintf() with scnprintf().
As stated in the above, truncation doesn't matter.
Fixes: 78bd8f5126
("ALSA: usb-audio: scarlett_gen2: Fix -Wformat-truncation warning")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230919071205.10684-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
b2ce0027d7
commit
aadb0330cf
1 changed files with 2 additions and 2 deletions
|
@ -3205,8 +3205,8 @@ static int scarlett2_add_line_in_ctls(struct usb_mixer_interface *mixer)
|
||||||
/* Add input phantom controls */
|
/* Add input phantom controls */
|
||||||
if (info->inputs_per_phantom == 1) {
|
if (info->inputs_per_phantom == 1) {
|
||||||
for (i = 0; i < info->phantom_count; i++) {
|
for (i = 0; i < info->phantom_count; i++) {
|
||||||
snprintf(s, sizeof(s), fmt, i + 1,
|
scnprintf(s, sizeof(s), fmt, i + 1,
|
||||||
"Phantom Power", "Switch");
|
"Phantom Power", "Switch");
|
||||||
err = scarlett2_add_new_ctl(
|
err = scarlett2_add_new_ctl(
|
||||||
mixer, &scarlett2_phantom_ctl,
|
mixer, &scarlett2_phantom_ctl,
|
||||||
i, 1, s, &private->phantom_ctls[i]);
|
i, 1, s, &private->phantom_ctls[i]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue