Many years ago we were warned that WD40 could get into the primers of your ammo and cause it not to detonate. You might do a search on the internet if someone doesn't send this info to you.
The famous "Box 'O Truth" site disproved this.
They put primed cases head up in blocks and applied various products to the primers.
Among them were WD-40, Hoppe's #9, CLP Breakfree, and Kroil.
Most of these are well know as good penetrating fluids.
Kroil can creep into a crack as small as one millionth of an inch.
After more then as much as 6 weeks NOT ONE primer failed to fire.
The Box O' Truth #39 - Oil Vs. Primers - The Box O' Truth
One case of WD-40 being used as a lubricant is detailed in "Good To Go" by multiple tour Vietnam Navy SEAL Harry Constance.
He said that when he returned from a patrol he'd remove the plastic stock and hand guards from his Stoner light machine gun and drop the gun AND HIS LINKED AMMO into a cut off 55 gallon drum of gasoline to soak while he cleaned up and had breakfast.
Then he'd remove the gun and clean it and spray it with WD-40 to lubricate it.
He also removed the linked 5.56 ammo, dried it off, then sprayed it with WD-40.
He said that in his tours he never had a stoppage.
To be fair, like all SEAL's he was fanatic about keeping the gun clean and lubed every day.