Cast some ptrdiff_t to int to kill printf format warnings.