* [tiwai-sound:for-next 6/10] sound/core/ump.c:1259:69: warning: '%s' directive output may be truncated writing up to 11 bytes into a region of size between 4 and 22
@ 2024-11-29 17:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-29 17:37 UTC (permalink / raw)
To: Takashi Iwai; +Cc: oe-kbuild-all, alsa-devel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
head: 9b5f8ee43e48c25fbe1a10163ec04343d750acd0
commit: e29e504e7890b9ee438ca6370d0180d607c473f9 [6/10] ALSA: ump: Indicate the inactive group in legacy substream names
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20241130/202411300103.FrGuTAYp-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241130/202411300103.FrGuTAYp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411300103.FrGuTAYp-lkp@intel.com/
All warnings (new ones prefixed by >>):
sound/core/ump.c: In function 'fill_substream_names':
>> sound/core/ump.c:1259:69: warning: '%s' directive output may be truncated writing up to 11 bytes into a region of size between 4 and 22 [-Wformat-truncation=]
1259 | snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
| ^~
sound/core/ump.c:1259:17: note: 'snprintf' output between 11 and 40 bytes into a destination of size 32
1259 | snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1260 | idx + 1, name,
| ~~~~~~~~~~~~~~
1261 | ump->groups[idx].active ? "" : " [Inactive]");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +1259 sound/core/ump.c
1246
1247 static void fill_substream_names(struct snd_ump_endpoint *ump,
1248 struct snd_rawmidi *rmidi, int dir)
1249 {
1250 struct snd_rawmidi_substream *s;
1251 const char *name;
1252 int idx;
1253
1254 list_for_each_entry(s, &rmidi->streams[dir].substreams, list) {
1255 idx = ump->legacy_mapping[s->number];
1256 name = ump->groups[idx].name;
1257 if (!*name)
1258 name = ump->info.name;
> 1259 snprintf(s->name, sizeof(s->name), "Group %d (%.16s)%s",
1260 idx + 1, name,
1261 ump->groups[idx].active ? "" : " [Inactive]");
1262 }
1263 }
1264
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-29 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-29 17:37 [tiwai-sound:for-next 6/10] sound/core/ump.c:1259:69: warning: '%s' directive output may be truncated writing up to 11 bytes into a region of size between 4 and 22 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox