mirror of
git://git.sv.gnu.org/findutils.git
synced 2026-02-01 06:08:59 +01:00
GCC 8 issues the following warning diagnostic:
xargs.c:1134:29: warning: '%u' directive output may be truncated writing \
between 1 and 10 bytes into a region of size 2 [-Wformat-truncation=]
static const char *fmt = "%u";
^~
xargs.c:1161:7: note: 'snprintf' output between 2 and 11 bytes into a \
destination of size 2
snprintf (buf, size+1, fmt, n);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* xargs/xargs.c (set_slot_var): Simplify BUF handling to pacify GCC 8
about safe use of snprintf wrt truncated writing.