I actually disagree. Unless it's a legal requirement to notify, I wouldn't volunteer anything.
I'm not advocating lying if you are specifically asked, just simply not volunteering the info up front. Telling the officer doesn't make the situation any more safe, it doesn't put him at ease, it literally serves no purpose for you. Volunteering that you have a gun is not going to make the stop any easier for you. In the best case scenario it will stretch out your stop while he asks you a hundred pointless questions. In the worst case scenario you meet a jittery cop and you get shot while giving him your license. There's a whole lot of possibilities in between those two things, none of which are enjoyable experiences. If someone volunteers to me that they're carrying, I'm pretty nonplussed about it and more or less ignore it. I'm an oddity. I've seen officers yard people out of cars, cuff them, disarm them, then leave them detained in cuffs on the curb for ten minutes while they run the person for felony disqualifiers and check the gun to see if it's stolen and registered; only to unhook the driver and send them on their way with not even an apology when everything comes back clear.
I'm also not sure what significance a CCW / CHL. has in this situation. All the ones I'm familiar with cover handguns only, and then only when concealed on the person. Carrying a long gun in a rack in the truck is a totally different beast; and long guns generally have their own laws as pertaining to transport which don't always align with handgun laws.
But having said all that, most people want to carry a firearm legally and appropriately, and not risk arrest and seizure, which I respect. I've honestly let myself get pretty lax about my own adherence to gun laws as so many of them don't apply to me. LEOSA, among other firearm law waivers, for example, authorizes carry of a loaded concealed long gun in all the states. I've never thought twice about racking a loaded shotgun and driving anywhere in the US, nor have I had any bad experiences on traffic stops when I've been carrying and haven't declared.
But because I'm in a different category than many posters here, the old disclaimer: YMMV, check local laws, don't blindly follow internet advice, etc...