Not to bicker...
But... I once fired a high powered rifle bullet within 12" of a threatening grizzly bear's ear from ~30yds distance in an effort to scare it away. He never even blinked. Just continued looking at me like I owed him money. It was as if I'd not fired the shot.
Bears come in all different flavors, and encounters occur under numerous different circumstances. I never expect, or depend on, warning shots to deter a bear. Some will turn and leave. Some, defending a carcass or cubs, will charge the moment a warning shot is fired.
One example: An aquaintence fired a warning shot over the head of large boar brown bear from ~35yds that was defending a winter-kill moose carcass early one spring on Alaska's Kenai Peninsula. The warning shot prompted an instant full-bore charge. He had time for one more shot before the bear flattened him, then crunched his face in his jaws. Only thing saved his life was a 44 Mag revolver in his chest holster. The bear's canines didn't penetrate his brain so he remained fully conscious. Was able to draw and empty the revolver into the underside of the bear by feel, while his face was inside the bear's jaws. He said the bear became still during the firing of the revolver, and a few seconds after the revolver was emptied. Then the bear released his head and walked away. He'd buried the revolver's muzzle into the fur on the underside of the bear. So in addition to the bullets, muzzle gases likely blew up into the bear's torso too. Didn't have the nerve to ask if he would fire another warning shot in a similar scenario...
Based on my experiences and those of other hunters I've talked with, if a bear is aware of my presence, isn't backing down, and is close enough to limit my response time, I fire no warning shots. Brown bear, grizzly bear, or black bear. A lot easier to take out a stationary bear than a charging bear.
Some black bears in the remote wilds of Alaska that rarely encounter people, pose a much greater threat than the average black bear living in populated areas in the States, IMO. They haven't learned to fear people, and the greater threat is from predatory stalk/attack. I experienced a predatory stalk by one such black bear about 20 years ago. He came in directly downwind of me, following my scent trail. Fortunately I was black bear hunting on an Alaskan mountainside at the time. He came into view at ~50 feet, eyes locked onto mine. Continued staring me down as he approached closer. At 20 feet he turned broadside to intimidate and show me how big he was. Shot and killed him at 20 feet, while he was broadside posturing. Mulling over the experience shortly after firing the kill shot, one conclusion was... that wilderness area just became one bear safer. And I couldn't have accomplished that with a can of bear spray.