[PATCH 2/4] kselftest/arm64: Fix printf() warning in the arm64 MTE prctl() test
Mark Brown
broonie at kernel.org
Fri Nov 8 07:10:59 PST 2024
On Fri, Nov 08, 2024 at 01:49:18PM +0000, Catalin Marinas wrote:
> While prctl() returns an 'int', the PR_MTE_TCF_MASK is defined as
> unsigned long which results in the larger type following a bitwise 'and'
> operation. Cast the printf() argument to 'int'.
> } else {
> ksft_print_msg("Got %x, expected %x\n",
> - (ret & PR_MTE_TCF_MASK), mask);
> + (int)(ret & PR_MTE_TCF_MASK), mask);
Shouldn't we just use a %lx here? Casts tend to be suspicious...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241108/c145a7a1/attachment.sig>
More information about the linux-arm-kernel
mailing list