Let's try to think like an armed bad guy and a bullet whizzes past his head.
The bad guy can only assume that the shooter is trying to kill him and just missed doing so.
Potentially, the bad guy will never hear the verbal warning because he is emptying his magazine at the com of the poor sap that fired the "warning shot".
If you are stationed somewhere that has an unarmed population, then maybe it would work. But, if not, I agree with M1911.
Sounds like a good way to die.