From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2206) id 1C22C385841D; Thu, 22 Jun 2023 04:53:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1C22C385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1687409637; bh=RlFdwJpA5FO5YRlKLnKrIxTzM4NP74AWxlewodsx9Gw=; h=From:To:Subject:Date:From; b=OOHaGaFPATZhszGo/Eb2jFsYqu39kbDQfRioddHWI3p3tqB9csYEUJTq9Dh8tQeCS l2nOfMHO1QTgmaI3GrCWwWu5jtwLvapHxuE8eLGHhWA+zdAQ1TaUkfA7ILVVgvWenT 2I09aS+Tubb/FELBuBQwADWo7vCOpkpQagbomXlU= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Siddhesh Poyarekar To: glibc-cvs@sourceware.org Subject: [glibc] sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Fix warn unused result X-Act-Checkin: glibc X-Git-Author: Frederic Berat X-Git-Refname: refs/heads/master X-Git-Oldrev: 131af38694627f9e5aee13fdc301bf2010759a1b X-Git-Newrev: d636339306d19beb486d6f3a0b364db845baf4e0 Message-Id: <20230622045357.1C22C385841D@sourceware.org> Date: Thu, 22 Jun 2023 04:53:57 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d636339306d19beb486d6f3a0b364db845baf4e0 commit d636339306d19beb486d6f3a0b364db845baf4e0 Author: Frederic Berat 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 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 #include +#include + 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);