aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc
diff options
context:
space:
mode:
authorFrederic Berat <fberat@redhat.com>2023-06-20 20:19:08 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-06-22 00:21:17 -0400
commitd636339306d19beb486d6f3a0b364db845baf4e0 (patch)
tree83bdb3979c599b464296d05aab3f22c6dd23bb18 /sysdeps/powerpc
parent131af38694627f9e5aee13fdc301bf2010759a1b (diff)
downloadglibc-d636339306d19beb486d6f3a0b364db845baf4e0.zip
glibc-d636339306d19beb486d6f3a0b364db845baf4e0.tar.gz
glibc-d636339306d19beb486d6f3a0b364db845baf4e0.tar.bz2
sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Fix warn unused result
The fread routine return value needs to be checked when fortification is enabled, hence use xfread helper. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/powerpc')
-rw-r--r--sysdeps/powerpc/fpu/tst-setcontext-fpscr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c b/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c
index 2fd8838..2eba5f2 100644
--- a/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c
+++ b/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c
@@ -27,6 +27,8 @@
#include <sys/auxv.h>
#include <support/support.h>
+#include <support/xstdio.h>
+
static ucontext_t ctx[3];
@@ -61,7 +63,7 @@ ElfW(Addr) query_auxv(int type)
do
{
- fread (&auxv_struct, sizeof (ElfW(auxv_t)), 1, auxv_f);
+ xfread (&auxv_struct, sizeof (ElfW(auxv_t)), 1, auxv_f);
auxv[i] = auxv_struct;
i++;
} while(auxv_struct.a_type != AT_NULL);