There is a de facto standard way of marking things that look like guns: you paint the tip of the "barrel" safety orange. It won't solve all problems, but it should give some people (e.g., law enforcement) a quick visual indicator, and it seems to make even the casual viewer a little less likely to parse the shape as a gun.

I worked on a satellite phone once that, when the antenna was extended, had a disconcerting resemblance to a Luger. We actually had an engineer held at gunpoint by law enforcement; she was out somewhere making a call and suddenly there was a cop yelling at her to drop the weapon, and she was standing there in confusion saying "*What* weapon?", and it was all very fraught. We went out and bought some safety-orange stickers for our test phones after that.