Assuming you are carrying legally, I think it’s probably a good idea to let him know, even if you aren’t required to. If you don’t tell him, and he spots it later during the encounter, he’s gonna get real excited real fast.
I watch the TV show Cops now and then, and I’m frequently amazed at how cavalier people can be when they are interacting with a person who is well-armed and has been instilled with the expectation that people he meets may try to hurt him on a moment’s notice. People will put their hands in their pockets, gesticulate wildly in close proximity to the cop as they tell their story, wander around, and do all sorts of other things that can make the cop edgy. AIUI Yanez never saw Castile pull a weapon, so Yanez should not have shot him - but Castile, having the most to lose, was unwise to be reaching anywhere without getting permission from the cop first (that’s my policy whenever I get stopped by the police).
From a societal level, we can reduce stupid police-involved shootings like this by teaching cops to be less trigger-happy. If you or I as individuals want to reduce our odds of being the victim of a police-involved shooting, we need to think about the cop’s perspective on the encounter and the kinds of behaviors/actions that he might find threatening.
Unexpectedly reaching for your wallet when you’re with a friend you’ve known for years? No big deal.
Unexpectedly reaching for your wallet when you’re with a cop you’ve known for all of ten seconds? One who might not have graduated at the top of his class, thinks you could be angry about being stopped, or have warrants, and could be armed and have nothing to lose? Very risky. You shouldn’t get shot for it, but you might, and there’s no undo button so think carefully about what you do and how you act when you’re with a cop. This advice is applicable regardless of your race or socioeconomic status.
I’ve heard from people with CCW licenses who were carrying during a police encounter, and were required to inform the cop that they were carrying. Some cops just say “thanks for letting me know;” others will have you step out, put your hands somewhere safe, and then they will take your weapon and hold it for the duration of the encounter, typically handing it back to you at the end with the magazine (and chambered round, if any) removed.
Gun or not, it’s good policy to always ask for permission before you put your hands somewhere the officer can’t see (e.g. your back pocket or your glovebox).
No gun on you? Keep your hands on the wheel and repeat after me: “My license is in my back pocket, do you mind if I reach for it?” Wait until he gives you the OK before you reach
Got a gun? Keep your hands on the wheel and repeat after me: “Officer, my license is in my back pocket, but I want to let you know I’m also carrying a gun in my waistband/holster/center console. How would you like to proceed?” Follow the officers directions carefully after that; move slowly and deliberately, listening carefully for any new directions, and thinking about (and avoiding) the sorts of actions he might find threatening.