diff options
author | Frédéric Bérat <fberat@redhat.com> | 2023-06-02 17:28:06 +0200 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2023-06-06 08:23:53 -0400 |
commit | 8c4f69d711481a18c70cb9a6c0a5367604894320 (patch) | |
tree | 7dc913567c6c1975b94217c48131fb6b3eb1d98d /stdio-common/bug5.c | |
parent | 7d421209287a07db5e926552ae5fbe9d8abb50dc (diff) | |
download | glibc-8c4f69d711481a18c70cb9a6c0a5367604894320.zip glibc-8c4f69d711481a18c70cb9a6c0a5367604894320.tar.gz glibc-8c4f69d711481a18c70cb9a6c0a5367604894320.tar.bz2 |
tests: fix warn unused result on asprintf calls
When enabling _FORTIFY_SOURCE, some functions now lead to warnings when
their result is not checked.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'stdio-common/bug5.c')
-rw-r--r-- | stdio-common/bug5.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/bug5.c b/stdio-common/bug5.c index 7bfe9b2..dfa19ae 100644 --- a/stdio-common/bug5.c +++ b/stdio-common/bug5.c @@ -7,6 +7,8 @@ #include <stdlib.h> #include <unistd.h> +#include <support/support.h> + static char buf[8192]; int @@ -60,7 +62,7 @@ main (void) the perhaps incompatible new shared libraries. */ unsetenv ("LD_LIBRARY_PATH"); - asprintf (&printbuf, "cmp %s %s", inname, outname); + printbuf = xasprintf ("cmp %s %s", inname, outname); result = system (printbuf); remove (inname); remove (outname); |