You never fire a warning shot because the bullet may end up hitting an innocent person and then you have some real legal problems.
Never, ever, fire a warning shot.
I can think of a hundred situations where a warning shot into the air is a billion times safer than shooting at the perp... People behind the perp, he’s in your house, and your kids’ rooms are behind the perp, etc.