Skip to content

Commit f59b81f

Browse files
tiwaigregkh
authored andcommitted
ALSA: ump: Shut up truncated string warning
commit ed990c0 upstream. The recent change for the legacy substream name update brought a compile warning for some compilers due to the nature of snprintf(). Use scnprintf() to shut up the warning since the truncation is intentional. Fixes: e29e504 ("ALSA: ump: Indicate the inactive group in legacy substream names") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202411300103.FrGuTAYp-lkp@intel.com/ Link: https://patch.msgid.link/20241130090009.19849-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f5c5661 commit f59b81f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/core/ump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,9 +1262,9 @@ static void fill_substream_names(struct snd_ump_endpoint *ump,
12621262
name = ump->groups[idx].name;
12631263
if (!*name)
12641264
name = ump->info.name;
1265-
snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
1266-
idx + 1, name,
1267-
ump->groups[idx].active ? "" : " [Inactive]");
1265+
scnprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
1266+
idx + 1, name,
1267+
ump->groups[idx].active ? "" : " [Inactive]");
12681268
}
12691269
}
12701270

0 commit comments

Comments
 (0)