]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: arm64: Check fread return value in exec_target
authorBala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>
Fri, 8 Aug 2025 08:08:30 +0000 (13:38 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:25 +0000 (11:56 +0200)
commit583f690401d66146f673346392a678cb4ebed596
tree1385f389f8902cc38339bdb52bdaa23c19995ee7
parent26243ef29a9f9f7f7988c80f23ba3369d37b8551
selftests: arm64: Check fread return value in exec_target

[ Upstream commit a679e5683d3eef22ca12514ff8784b2b914ebedc ]

Fix -Wunused-result warning generated when compiled with gcc 13.3.0,
by checking fread's return value and handling errors, preventing
potential failures when reading from stdin.

Fixes compiler warning:
warning: ignoring return value of 'fread' declared with attribute
'warn_unused_result' [-Wunused-result]

Fixes: 806a15b2545e ("kselftests/arm64: add PAuth test for whether exec() changes keys")
Signed-off-by: Bala-Vignesh-Reddy <reddybalavignesh9979@gmail.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/arm64/pauth/exec_target.c