Just wing him
If you have a gun and someone with no weapon picks a fight with you, the expected outcome is that the aggressor backs down. It's call brandishing a gun.
Possible exceptions are that the aggressor is suicidal, insane or the gunman is motivated by hate.
If the gunman wants to make a statement, he could fire the gun in the air or into the ground. They do it all the time in cowboy movies. If frightened to the point of panic, a non-lethal wound could be attempted.
See more about comments here.