public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Fix warn unused result
@ 2023-06-22  4:53 Siddhesh Poyarekar
  0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2023-06-22  4:53 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d636339306d19beb486d6f3a0b364db845baf4e0

commit d636339306d19beb486d6f3a0b364db845baf4e0
Author: Frederic Berat <fberat@redhat.com>
Date:   Tue Jun 20 20:19:08 2023 +0200

    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>

Diff:
---
 sysdeps/powerpc/fpu/tst-setcontext-fpscr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c b/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c
index 2fd8838bbe..2eba5f2672 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-22  4:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-22  4:53 [glibc] sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Fix warn unused result Siddhesh Poyarekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).