Fix warnings about int/pointer casting.