Absolutely NEVER fire a warning shot. The law typically requires the situation be absolutely unavoidable, with immediate threat to your life. A warning shot demonstrates that those conditions did not exist in your situation. The prosecutors will use that warning shot to put you in jail. If the situation is bad enough you feel justified in defending yourself, then defend yourself. "Warning" someone is not defending yourself. It's irresponsible.