I have seen this point discussed before in various forums. The general consensus is that because WD-40 is a lubricant and penetrant, the penetrating qualities make it a very poor choice should any of it migrate and get on your bullet primers, as they can neutralize them.
I would also make sure you do not get any on your wood stocks/grips, if your gun has them. Other reports are that WD can get gummy and harden up over time, causing potential problems.
If it were me, I would use some Gun Scrubber to get it clean, particularly paying attention to the bore and cylinders (if a revolver) and then apply some suitable oil/protectant such as Breakfree CLP, or something similar.
Just my opinion.