Most cities it is illegal to shoot a firearm. That's the law. A good cop would probably use his common sense and give you a pass. A prick cop could arrest you, or, use that as a time to assert his authority and give you a lecture.