These are indeed shells in their quick-ready mounts lined around the platform of the 4" cannon. Here is a pic of the real deal:
It might be less safe than say an armoured locker but the cordite propellants are stored seperately, and in a chance engagement with a surfaced sub speed trumps safety.