Okay, this aggravates me but I am not attacking you personally.
Nobody told you that in your CHL class. Or, more to the point, nobody should have stated that as the law in Texas. There is no Texas statute with respect to warning shots. However, there are statutes that by implication could be taken to be ban on warning shots.
For instance - and this is from a Texas authorized public website so you can look the statute up anytime you are in the mood:
Warning shots, per se, are not described in the statute. You have to be a fool to fire one, but that's what this discussion is about in the first instance. As a Texas lawyer and CHL (now LTC) instructor I take great umbrage at the Penal Code being wrongly cited. Nothing personal. Except against your instructor, my friend, who clearly told you something that is not stated in the law.
That's why I said, "As I recall...'. Thanks for clearing that up. The class was 2 1/2 years ago and your post did jog my memory in another regard -- I took notes during the class but had forgotten all about them. After some rummaging, I found them. Here are the relevant portions of my notes, verbatim:
"Use of force
...
Retreat is always the best option, if available. Though TX [law] says there is "no duty" to retreat, it's best to do so anyway. ... 'Warning shot' means you had a chance to retreat. [Implying that there still could be legal problems if you take the shot.]
...
Home break-in. Castle law allows you to assume that break-ins intend to do you harm. Even attempting to enter justifies deadly force. They don't have to be inside. But don't shoot until you've Id'd the target. (Warning shots are illegal in TX)"
I don't think I would have put that in my notes, unless the instructor had said it. However I can't completely discount the possibility that I inferred that from the presentation, which also included the following case study:
During the home break-in presentation, the instructor told about a case where a homeowner fired a high warning shot through his front door when someone pounded on it late at night. It turned out the guy at the front door was very tall, and the shot went through his head, killing him. It also turned out that the deceased was the teenage son of the next door neighbor who was extremely drunk, and apparently thought he was at his own house. Legal stuff ensued.
Legal, or not, I got the message that warning shots are a bad idea.