The metal close by will modify/amplify/substract the magnetic fields of the earth or artificial fields close by. Normally they should not be a problem unless you are trying to use the compass.
If one of the close by objects is magnetic, and the compass is continually moving within its field, it may effect the magnet in the compass.
Normally the magnet in the compass will loose some magnetism over its life anyway, but this shouldn't usually be noticable for decades or longer in good quality compasses.

I havent had any problems with any of my compasses from loosing accuracy from nearby objects. I do however watch what I do with any magnetic tools that I use nearby. I regulary use magnetic tools, and they get put in the back pockets as I'm working not the front pockets where my compass is.