As a marksman and gun user since law school days (see my: Open Fire on Chicago's Gun Law), and as a holder of a Conceal and Carry Weapons permit valid in more than two dozen states, I can note with authority that a portion of one link posted on the main page today (15 Uses For WD-40) provides bad advice for gunners.
WD-40 should never be used on any firearm. It will cake on and damage the barrel. It will also deactivate primers. This point about primers is especially important to understand if you are using anything other than rim fire ammo. So get a good gun oil for your weapon, such as Burke's, and let WD-40 do what it does best, deal with squeaky doors and other household tasks.