Carelessly-fired warning shots endanger innocent people, true. On the other hand, if the person would have been legally entitled to e.g. shoot a plastic soda bottle which was sitting at the spot on the ground where his bullet hit (which would have been permissible in many rural areas, but forbidden in many urban areas), the fact that the sight of him shooting that area of the ground might disturb a burglar should not change the legality of his doing so. Suppose, for whatever reason, the guy had a bullet-catching device on his porch (similar to the ones some gun repair shops use for functional testing when accuracy is not a concern) and had fired into that, such that he was basically using the gun as a noisemaker. Should that have been illegal?
Did he have one?
That's the only relevant question.