I'm guessing you're trying to compile 32-bit code written by someone unaware of or unconcerned with portability issues of the C language on a 64-bit system.
The problem is that converting a pointer to an integer that cannot represent its value is undefined behaviour. See C11 6.3.2.3 §6:
Any pointer type may be converted to an integer type. [...] If the result cannot be represented in the integer type, the behavior is undefined.
Portable code would have used a cast to uintptr_t
(or size_t
in the pre-C99 era) instead of int
.
Apparently, the address held by the pointer is used as a source of randomness to get an arbitrary lower-case letter (I think it's unlikely that Mints97 is correct and the author just forgot to dereference the pointer, but without some more code, no one can say for sure).
If you ignore the warning, in principle, the code might actually blow up on architectures that raise signals on integer overflow. The more likely case is a possibly harmless bug (depending on how the result is used): Instead of a lower-case letter, you might get a special character or upper-case letter if (int)fch
happens to be negative.