From 87c0214c495a998220fa982d88616aab149729e2 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 3 Dec 2018 09:54:46 -0800 Subject: mktemp: fix warning with glibc 2.15. Old versions of glibc had warn_unused_result on mktemp(3), despite it always returning its argument. Still, we can silence the warning and save a line, so... --- toys/lsb/mktemp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'toys/lsb') diff --git a/toys/lsb/mktemp.c b/toys/lsb/mktemp.c index 440cf6b1..ae97e494 100644 --- a/toys/lsb/mktemp.c +++ b/toys/lsb/mktemp.c @@ -48,8 +48,7 @@ void mktemp_main(void) ? xstrdup(template) : xmprintf("%s/%s", TT.p, template); if (toys.optflags & FLAG_u) { - mktemp(template); - xputs(template); + xputs(mktemp(template)); } else if (toys.optflags & FLAG_d ? !mkdtemp(template) : mkstemp(template) == -1) { if (toys.optflags & FLAG_q) toys.exitval = 1; else perror_exit("Failed to create %s %s/%s", -- cgit v1.2.3