The trunk of a car is legally recognized as a "locked container" as long as there is no access from within the car. If the gun is in the trunk, you can carry it in any type of container. The magazines may also be carried loaded in the trunk, they can't be in the gun.
I am not sure about that...