Very Bad Idea
In addition to the aforementioned concerns of being accountible for each shot fired, risk of injury to bystanders, etc. another thing to keep in mind is that firing a warning shot decreases your defensive payload by one round. In a glock-o-matic, you may feel one shot less isn't significant, however think about how much you would want that warning shot back the moment your slide locks back with an enpty gun. In a J-frame revolver, that warning shor deplinishes your payload by 20%.
It just doesn't make sence. The only notable exception for me would be the use of firing a warning shot accross the bow in a potential naval engagement.