On Fri, Aug 03, 2018 at 02:33:51PM -0700, Lucas De Marchi wrote: > so you are casting the *sign* away, ok. But casting only st.st_size > should suffice. I've just tried with some examples and I couldn't trigger the warning which I have seen in other situations like this, i.e. "always false due to limited range of data type". If I cast the off_t to size_t, the compiler knows that it is not possible that it could ever be larger than SIZE_MAX, optimizing the block away. So I took uintmax_t. But as long as there's no annoying warning, I am fine with just casting st_size. Tobias -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html