mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 06:20:06 +00:00
benchtests: fix warn unused result
Few tests needed to properly check for asprintf and system calls return values with _FORTIFY_SOURCE enabled. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
parent
d636339306
commit
99f9ae4ed0
@ -254,7 +254,11 @@ main (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *filename;
|
char *filename;
|
||||||
asprintf (&filename, INPUT_PREFIX "%s", input_files[i]);
|
if (asprintf (&filename, INPUT_PREFIX "%s", input_files[i]) < 0)
|
||||||
|
{
|
||||||
|
printf ("asprintf failed, aborting!\n");
|
||||||
|
return ERROR_FILENAME;
|
||||||
|
}
|
||||||
result = bench_file (json_ctx, input_files[i], filename, locale + 1);
|
result = bench_file (json_ctx, input_files[i], filename, locale + 1);
|
||||||
|
|
||||||
if (result != OK)
|
if (result != OK)
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
|
#include <support/xstdlib.h>
|
||||||
#include <support/xunistd.h>
|
#include <support/xunistd.h>
|
||||||
#include <support/check.h>
|
#include <support/check.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -44,7 +45,7 @@ tracee_func (int pid)
|
|||||||
char str[80];
|
char str[80];
|
||||||
sprintf (str, "cat /proc/%d/maps", pid);
|
sprintf (str, "cat /proc/%d/maps", pid);
|
||||||
puts (str);
|
puts (str);
|
||||||
system (str);
|
xsystem (str);
|
||||||
fflush (stdout);
|
fflush (stdout);
|
||||||
|
|
||||||
TEST_VERIFY_EXIT (ptrace (PTRACE_TRACEME) == 0);
|
TEST_VERIFY_EXIT (ptrace (PTRACE_TRACEME) == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user