I have used WD40 on a variety of guns without any apparent damage to their finish.
I find it particularly useful for dealing with blackpowder fouling if it is sprayed down the barrel immediately after use.
It seems to form a barrier between the corrosive fouling and the metal.
The fouling then comes out very easily in the form of a powdery grey residue rather than the usual sticky, sooty mess.
I don?t generally use oil as a preservative because it attracts dust and makes a gooey mess.
It also coagulates and can impede the mechanism if left for long periods.
Oil also has a damaging effect on woodwork and once a stock is oil-soaked it is hard to remove it.
I find conservation-grade wax polish such as Renaissance Wax a far better preservative.
This forms a hard coating that sheds both dust and water and is used by all professional conservators on arms and armour.