Re: [PATCH] selftest/mm: fix pointer comparison in mremap_test

From: David Hildenbrand (Red Hat)

Date: Thu Nov 06 2025 - 06:19:02 EST


On 06.11.25 11:49, Ankit Khushwaha wrote:
Pointer arthemitic with 'void * addr' and 'unsigned long long dest_alignment'
triggers following warning:

mremap_test.c:1035:31: warning: pointer comparison always evaluates to
false [-Wtautological-compare]
1035 | if (addr + c.dest_alignment < addr) {
| ^

typecasting 'addr' to 'unsigned long long' to fix pointer comparison.

With which compiler are you seeing this?

--
Cheers

David