From a84dcb4bdfe5070f2327da693d8b025c89b4877a Mon Sep 17 00:00:00 2001 From: Frederic Berat Date: Mon, 12 Jun 2023 17:18:20 +0200 Subject: tests: replace fread by xfread With fortification enabled, fread calls return result needs to be checked, has it gets the __wur macro enabled. Reviewed-by: Siddhesh Poyarekar --- stdio-common/tst-fmemopen3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'stdio-common/tst-fmemopen3.c') diff --git a/stdio-common/tst-fmemopen3.c b/stdio-common/tst-fmemopen3.c index bef87b7..1627f17 100644 --- a/stdio-common/tst-fmemopen3.c +++ b/stdio-common/tst-fmemopen3.c @@ -21,6 +21,8 @@ #include #include +#include + static void print_buffer (const char *s, size_t n) { @@ -153,7 +155,7 @@ do_test_read_seek_neg (const char *mode, const char *expected) FILE *fp = fmemopen (buf, sizeof (buf), mode); fseek (fp, offset, SEEK_END); - fread (tmp, tmps, 1, fp); + xfread (tmp, tmps, 1, fp); if (memcmp (tmp, expected, tmps) != 0) { -- cgit v1.1