]> sourceware.org Git - glibc.git/commitdiff
sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Fix warn unused result
authorFrederic Berat <fberat@redhat.com>
Tue, 20 Jun 2023 18:19:08 +0000 (20:19 +0200)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 22 Jun 2023 04:21:17 +0000 (00:21 -0400)
The fread routine return value needs to be checked when fortification
is enabled, hence use xfread helper.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
sysdeps/powerpc/fpu/tst-setcontext-fpscr.c

index 2fd8838bbe64ee06139a6cc2244fa4a729f11987..2eba5f26726dbb7c4ffa0adab5e851c15b261033 100644 (file)
@@ -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);
This page took 0.046394 seconds and 5 git commands to generate.