Fix int precision warnings and 64-bit format args